This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
webserviceproxynamespace.LatLng latlng = new webserviceProxy().GetLatLng("Orlando, FL, 32803"); | |
anotherproxynamespace.LatLng latlng2 = new anotherwebservice().GetPosition("Orlando", "FL", "32803"); | |
//this other library wants a LatLng object | |
var map = new Mapping.MapManager(); | |
map.MarkPosition(loose latlng); //parameter type is Mapping.LatLng but latlng is webserviceproxynamespace.LatLng type, should work! | |
map.MarkPosition(loose latlng2); //parameter type is Mapping.LatLng but latlng2 is anotherproxynamespace.LatLng type, should work! | |
//how does this work? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class NLogLoggerExtensions | |
{ | |
public static void LogAction(this NLog.ILogger Log, Action action, string startingVerb, string completedVerb, string format, params object[] args) | |
{ | |
try | |
{ | |
if(Log.IsDebugEnabled) | |
{ | |
Log.Debug(format.Replace("[verb]", startingVerb), args); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static partial class Utils | |
{ | |
/// <summary> | |
/// Checks each supplied value for a non-null value, returning first one supplied. | |
/// It is recommend to use EmptyFallbacks(Func<string>) overload for any less than trivial value retrievals. | |
/// </summary> | |
/// <example> | |
/// var value = Util.EmptyFallbacks(dictionary["key"], someothervalue, "default value"); | |
/// </example> | |
/// <param name="values"></param> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
public class ValidateCheckBuilder | |
{ | |
private List<ValidationCheck> _validationchecks = new List<ValidationCheck>(); | |
public IEnumerable<ValidationCheck> ValidationChecks { get { return this._validationchecks; } } | |
private bool? _allValid; | |
public bool AllValid { get { return _allValid.GetValueOrDefault(); } } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace System.Text | |
{ | |
internal static class StringBuilderExtensions | |
{ | |
#if EXTENSIONS_SUPPORTED | |
public static StringBuilder ReplaceAt(this StringBuilder sb, string value, int index, int count) | |
{ | |
return StringBuilderExtensions.ReplaceAt(sb, value, index, count); | |
} | |
#endif |