public void IsNotNull_should_not_throw_exception_when_passing_non_null_value() { Assert.DoesNotThrow(() => Invariant.IsNotNull(new object(), "x")); }
public SmtpClientWrapper(SmtpClient realClient) { Invariant.IsNotNull(realClient, "realClient"); this.realClient = realClient; }
/// <summary> /// Initializes a new instance of the <see cref="RegisterModelMetadata"/> class. /// </summary> /// <param name="container">The container.</param> public RegisterDependencies(ContainerAdapter container) { Invariant.IsNotNull(container, "container"); Container = container; }
public void IsNotNull_should_throw_exception_when_passing_null_value() { Assert.Throws <ArgumentNullException>(() => Invariant.IsNotNull(null, "x")); }
/// <summary> /// Initializes a new instance of the <see cref="T:MvcExtensions.USO.RegisterAreaControllerFactory" /> class. /// </summary> /// <param name="container">The container.</param> public RegisterAreaControllerFactory(ContainerAdapter container) { Invariant.IsNotNull(container, "container"); this.Container = container; }
/// <summary> /// Initializes a new instance of the <see cref="ConfigurableTypeMappingBase{TType1,TType2}"/> class. /// </summary> /// <param name="registry">The registry.</param> protected ConfigurableTypeMappingBase(TypeMappingRegistry <TType1, TType2> registry) { Invariant.IsNotNull(registry, "registry"); Registry = registry; }
public static string UrlDecode(this string source) { Invariant.IsNotNull(source, nameof(source)); return(HttpUtility.UrlDecode(source)); }
public static string AttributeEncode(this string source) { Invariant.IsNotNull(source, nameof(source)); return(HttpUtility.HtmlAttributeEncode(source)); }
public EmailTemplateModelWrapper(IDictionary <string, object> propertyMap) { Invariant.IsNotNull(propertyMap, "propertyMap"); this.propertyMap = propertyMap; }
public static IStreamable <Empty, TPayload> ToCleanStreamable <TPayload>(this StreamEvent <TPayload>[] input) { Invariant.IsNotNull(input, "input"); return(input.OrderBy(v => v.SyncTime).ToArray().ToStreamable()); }
public static StreamEvent <TPayload>[] ToStreamEventArray <TPayload>(this IStreamable <Empty, TPayload> input) { Invariant.IsNotNull(input, "input"); return(input.ToStreamEventObservable().ToEnumerable().ToArray()); }