Share via


StructuralObject.SetValidValue Method

Definition

Overloads

SetValidValue(Nullable<Int16>, String)

Makes sure the Int16 value being set for a property is valid.

SetValidValue(Nullable<Guid>, String)

Makes sure the Guid value being set for a property is valid.

SetValidValue(Nullable<Double>, String)

Makes sure the Double value being set for a property is valid.

SetValidValue(Nullable<Decimal>, String)

Makes sure the Decimal value being set for a property is valid.

SetValidValue(Nullable<DateTimeOffset>, String)

Makes sure the DateTimeOffset value being set for a property is valid.

SetValidValue(Nullable<DateTime>, String)

Makes sure the DateTime value being set for a property is valid.

SetValidValue(Nullable<Byte>, String)

Makes sure the Byte value being set for a property is valid.

SetValidValue(Double, String)

Makes sure the Double value being set for a property is valid.

SetValidValue(Int64, String)

Makes sure the Int64 value being set for a property is valid.

SetValidValue(Int32, String)

Makes sure the Int32 value being set for a property is valid.

SetValidValue(Int16, String)

Makes sure the Int16 value being set for a property is valid.

SetValidValue(Guid, String)

Makes sure the Guid value being set for a property is valid.

SetValidValue(Nullable<Int32>, String)

Makes sure the Int32 value being set for a property is valid.

SetValidValue(Decimal, String)

Makes sure the Decimal value being set for a property is valid.

SetValidValue(DateTimeOffset, String)

Makes sure the DateTimeOffset value being set for a property is valid.

SetValidValue(Nullable<Boolean>, String)

Makes sure the Boolean value being set for a property is valid.

SetValidValue(Nullable<Int64>, String)

Makes sure the Int64 value being set for a property is valid.

SetValidValue(Nullable<UInt64>, String)

Makes sure the UInt64 value being set for a property is valid.

SetValidValue(Nullable<Single>, String)

Makes sure the Single value being set for a property is valid.

SetValidValue(String, Boolean, String)

Validates that the property is not null, and throws if it is.

SetValidValue(DbGeometry, Boolean, String)

Validates that the property is not null, and throws if it is.

SetValidValue(DbGeography, Boolean, String)

Validates that the property is not null, and throws if it is.

SetValidValue(Byte[], Boolean, String)

Makes sure the System.Byte[] value being set for a property is valid.

SetValidValue(UInt64, String)

Makes sure the UInt64 value being set for a property is valid.

SetValidValue(UInt32, String)

Makes sure the UInt32 value being set for a property is valid.

SetValidValue(UInt16, String)

Makes sure the UInt16 value being set for a property is valid.

SetValidValue(TimeSpan, String)

Makes sure the TimeSpan value being set for a property is valid.

SetValidValue(String, Boolean)

Validates that the property is not null, and throws if it is.

SetValidValue(Single, String)

Makes sure the Single value being set for a property is valid.

SetValidValue(SByte, String)

Makes sure the SByte value being set for a property is valid.

SetValidValue(DateTime, String)

Makes sure the DateTime value being set for a property is valid.

SetValidValue(Nullable<UInt32>, String)

Makes sure the UInt32 value being set for a property is valid.

SetValidValue(Nullable<UInt16>, String)

Makes sure the UInt16 value being set for a property is valid.

SetValidValue(Nullable<TimeSpan>, String)

Makes sure the TimeSpan value being set for a property is valid.

SetValidValue(Nullable<SByte>, String)

Makes sure the SByte value being set for a property is valid.

SetValidValue(DbGeometry, Boolean)

Validates that the property is not null, and throws if it is.

SetValidValue(UInt32)

Makes sure the UInt32 value being set for a property is valid.

SetValidValue(Byte[], Boolean)

Makes sure the System.Byte[] value being set for a property is valid.

SetValidValue(Nullable<Decimal>)

Makes sure the Decimal value being set for a property is valid.

SetValidValue(Nullable<DateTimeOffset>)

Makes sure the DateTimeOffset value being set for a property is valid.

SetValidValue(Nullable<DateTime>)

Makes sure the DateTime value being set for a property is valid.

SetValidValue(Nullable<Byte>)

Makes sure the Byte value being set for a property is valid.

SetValidValue(Nullable<Boolean>)

Makes sure the Boolean value being set for a property is valid.

SetValidValue(Int64)

Makes sure the Int64 value being set for a property is valid.

SetValidValue(Int32)

Makes sure the Int32 value being set for a property is valid.

SetValidValue(Int16)

Makes sure the Int16 value being set for a property is valid.

SetValidValue(Guid)

Makes sure the Guid value being set for a property is valid.

SetValidValue(Double)

Makes sure the Double value being set for a property is valid.

SetValidValue(Decimal)

Makes sure the Decimal value being set for a property is valid.

SetValidValue(DateTimeOffset)

Makes sure the DateTimeOffset value being set for a property is valid.

SetValidValue(DateTime)

Makes sure the DateTime value being set for a property is valid.

SetValidValue(Byte)

Makes sure the Byte value being set for a property is valid.

SetValidValue(Boolean)

Makes sure the Boolean value being set for a property is valid.

SetValidValue(Nullable<Double>)

Makes sure the Double value being set for a property is valid.

SetValidValue(DbGeography, Boolean)

Validates that the property is not null, and throws if it is.

SetValidValue(Nullable<Guid>)

Makes sure the Guid value being set for a property is valid.

SetValidValue(Nullable<Int32>)

Makes sure the Int32 value being set for a property is valid.

SetValidValue(Byte, String)

Makes sure the Byte value being set for a property is valid.

SetValidValue(Boolean, String)

Makes sure the Boolean value being set for a property is valid.

SetValidValue(UInt64)

Makes sure the UInt64 value being set for a property is valid.

SetValidValue(UInt16)

Makes sure the UInt16 value being set for a property is valid.

SetValidValue(TimeSpan)

Makes sure the TimeSpan value being set for a property is valid.

SetValidValue(Single)

Makes sure the Single value being set for a property is valid.

SetValidValue(Nullable<Int16>)

Makes sure the Int16 value being set for a property is valid.

SetValidValue(SByte)

Makes sure the SByte value being set for a property is valid.

SetValidValue(Nullable<UInt32>)

Makes sure the UInt32 value being set for a property is valid.

SetValidValue(Nullable<UInt16>)

Makes sure the UInt16 value being set for a property is valid.

SetValidValue(Nullable<TimeSpan>)

Makes sure the TimeSpan value being set for a property is valid.

SetValidValue(Nullable<Single>)

Makes sure the Single value being set for a property is valid.

SetValidValue(Nullable<SByte>)

Makes sure the SByte value being set for a property is valid.

SetValidValue(Nullable<Int64>)

Makes sure the Int64 value being set for a property is valid.

SetValidValue(Nullable<UInt64>)

Makes sure the UInt64 value being set for a property is valid.

SetValidValue<T>(T, T, String)

Sets a complex object for the specified property.

SetValidValue(Nullable<Int16>, String)

Makes sure the Int16 value being set for a property is valid.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="propertyName")]
protected internal static Nullable<short> SetValidValue (Nullable<short> value, string propertyName);
static member SetValidValue : Nullable<int16> * string -> Nullable<int16>
Protected Friend Shared Function SetValidValue (value As Nullable(Of Short), propertyName As String) As Nullable(Of Short)

Parameters

value
Nullable<Int16>

The nullable Int16 value.

propertyName
String

The name of the property that is being validated.

Returns

The nullable Int16 value being set.

Attributes

Applies to

SetValidValue(Nullable<Guid>, String)

Makes sure the Guid value being set for a property is valid.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="propertyName")]
protected internal static Nullable<Guid> SetValidValue (Nullable<Guid> value, string propertyName);
static member SetValidValue : Nullable<Guid> * string -> Nullable<Guid>
Protected Friend Shared Function SetValidValue (value As Nullable(Of Guid), propertyName As String) As Nullable(Of Guid)

Parameters

value
Nullable<Guid>

The nullable Guid value.

propertyName
String

The name of the property that is being validated.

Returns

The nullable Guid value being set.

Attributes

Applies to

SetValidValue(Nullable<Double>, String)

Makes sure the Double value being set for a property is valid.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="propertyName")]
protected internal static Nullable<double> SetValidValue (Nullable<double> value, string propertyName);
static member SetValidValue : Nullable<double> * string -> Nullable<double>
Protected Friend Shared Function SetValidValue (value As Nullable(Of Double), propertyName As String) As Nullable(Of Double)

Parameters

value
Nullable<Double>

The nullable Double value.

propertyName
String

The name of the property that is being validated.

Returns

The nullable Double value being set.

Attributes

Applies to

SetValidValue(Nullable<Decimal>, String)

Makes sure the Decimal value being set for a property is valid.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="propertyName")]
protected internal static Nullable<decimal> SetValidValue (Nullable<decimal> value, string propertyName);
static member SetValidValue : Nullable<decimal> * string -> Nullable<decimal>
Protected Friend Shared Function SetValidValue (value As Nullable(Of Decimal), propertyName As String) As Nullable(Of Decimal)

Parameters

value
Nullable<Decimal>

The nullable Decimal value.

propertyName
String

The name of the property that is being validated.

Returns

The nullable Decimal value being set.

Attributes

Applies to

SetValidValue(Nullable<DateTimeOffset>, String)

Makes sure the DateTimeOffset value being set for a property is valid.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="propertyName")]
protected internal static Nullable<DateTimeOffset> SetValidValue (Nullable<DateTimeOffset> value, string propertyName);
static member SetValidValue : Nullable<DateTimeOffset> * string -> Nullable<DateTimeOffset>
Protected Friend Shared Function SetValidValue (value As Nullable(Of DateTimeOffset), propertyName As String) As Nullable(Of DateTimeOffset)

Parameters

propertyName
String

The name of the property that is being validated.

Returns

The DateTimeOffset value being set.

Attributes

Applies to

SetValidValue(Nullable<DateTime>, String)

Makes sure the DateTime value being set for a property is valid.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="propertyName")]
protected internal static Nullable<DateTime> SetValidValue (Nullable<DateTime> value, string propertyName);
static member SetValidValue : Nullable<DateTime> * string -> Nullable<DateTime>
Protected Friend Shared Function SetValidValue (value As Nullable(Of DateTime), propertyName As String) As Nullable(Of DateTime)

Parameters

value
Nullable<DateTime>

The nullable DateTime value.

propertyName
String

The name of the property that is being validated.

Returns

The nullable DateTime value being set.

Attributes

Applies to

SetValidValue(Nullable<Byte>, String)

Makes sure the Byte value being set for a property is valid.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="propertyName")]
protected internal static Nullable<byte> SetValidValue (Nullable<byte> value, string propertyName);
static member SetValidValue : Nullable<byte> * string -> Nullable<byte>
Protected Friend Shared Function SetValidValue (value As Nullable(Of Byte), propertyName As String) As Nullable(Of Byte)

Parameters

value
Nullable<Byte>

The nullable Byte value.

propertyName
String

The name of the property that is being validated.

Returns

The nullable Byte value being set.

Attributes

Applies to

SetValidValue(Double, String)

Makes sure the Double value being set for a property is valid.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="propertyName")]
protected internal static double SetValidValue (double value, string propertyName);
static member SetValidValue : double * string -> double
Protected Friend Shared Function SetValidValue (value As Double, propertyName As String) As Double

Parameters

value
Double

The Double value.

propertyName
String

The name of the property that is being validated.

Returns

The Double value being set.

Attributes

Applies to

SetValidValue(Int64, String)

Makes sure the Int64 value being set for a property is valid.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="propertyName")]
protected internal static long SetValidValue (long value, string propertyName);
static member SetValidValue : int64 * string -> int64
Protected Friend Shared Function SetValidValue (value As Long, propertyName As String) As Long

Parameters

value
Int64

The Int64 value.

propertyName
String

The name of the property that is being validated.

Returns

The Int64 value being set.

Attributes

Applies to

SetValidValue(Int32, String)

Makes sure the Int32 value being set for a property is valid.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="propertyName")]
protected internal static int SetValidValue (int value, string propertyName);
static member SetValidValue : int * string -> int
Protected Friend Shared Function SetValidValue (value As Integer, propertyName As String) As Integer

Parameters

value
Int32

The Int32 value.

propertyName
String

The name of the property that is being validated.

Returns

The Int32 value being set.

Attributes

Applies to

SetValidValue(Int16, String)

Makes sure the Int16 value being set for a property is valid.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="propertyName")]
protected internal static short SetValidValue (short value, string propertyName);
static member SetValidValue : int16 * string -> int16
Protected Friend Shared Function SetValidValue (value As Short, propertyName As String) As Short

Parameters

value
Int16

The Int16 value.

propertyName
String

The name of the property that is being validated.

Returns

The Int16 value being set.

Attributes

Applies to

SetValidValue(Guid, String)

Makes sure the Guid value being set for a property is valid.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="propertyName")]
protected internal static Guid SetValidValue (Guid value, string propertyName);
static member SetValidValue : Guid * string -> Guid
Protected Friend Shared Function SetValidValue (value As Guid, propertyName As String) As Guid

Parameters

value
Guid

The Guid value.

propertyName
String

Name of the property that is being validated.

Returns

The Guid value being set.

Attributes

Applies to

SetValidValue(Nullable<Int32>, String)

Makes sure the Int32 value being set for a property is valid.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="propertyName")]
protected internal static Nullable<int> SetValidValue (Nullable<int> value, string propertyName);
static member SetValidValue : Nullable<int> * string -> Nullable<int>
Protected Friend Shared Function SetValidValue (value As Nullable(Of Integer), propertyName As String) As Nullable(Of Integer)

Parameters

value
Nullable<Int32>

The nullable Int32 value.

propertyName
String

The name of the property that is being validated.

Returns

The nullable Int32 value being set.

Attributes

Applies to

SetValidValue(Decimal, String)

Makes sure the Decimal value being set for a property is valid.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="propertyName")]
protected internal static decimal SetValidValue (decimal value, string propertyName);
static member SetValidValue : decimal * string -> decimal
Protected Friend Shared Function SetValidValue (value As Decimal, propertyName As String) As Decimal

Parameters

value
Decimal

The Decimal value.

propertyName
String

The name of the property that is being validated.

Returns

The Decimal value being set.

Attributes

Applies to

SetValidValue(DateTimeOffset, String)

Makes sure the DateTimeOffset value being set for a property is valid.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="propertyName")]
protected internal static DateTimeOffset SetValidValue (DateTimeOffset value, string propertyName);
static member SetValidValue : DateTimeOffset * string -> DateTimeOffset
Protected Friend Shared Function SetValidValue (value As DateTimeOffset, propertyName As String) As DateTimeOffset

Parameters

value
DateTimeOffset

The DateTimeOffset value.

propertyName
String

The name of the property that is being validated.

Returns

The DateTimeOffset value being set.

Attributes

Applies to

SetValidValue(Nullable<Boolean>, String)

Makes sure the Boolean value being set for a property is valid.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="propertyName")]
protected internal static Nullable<bool> SetValidValue (Nullable<bool> value, string propertyName);
static member SetValidValue : Nullable<bool> * string -> Nullable<bool>
Protected Friend Shared Function SetValidValue (value As Nullable(Of Boolean), propertyName As String) As Nullable(Of Boolean)

Parameters

value
Nullable<Boolean>

The nullable Boolean value.

propertyName
String

The name of the property that is being validated.

Returns

The nullable Boolean value being set.

Attributes

Applies to

SetValidValue(Nullable<Int64>, String)

Makes sure the Int64 value being set for a property is valid.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="propertyName")]
protected internal static Nullable<long> SetValidValue (Nullable<long> value, string propertyName);
static member SetValidValue : Nullable<int64> * string -> Nullable<int64>
Protected Friend Shared Function SetValidValue (value As Nullable(Of Long), propertyName As String) As Nullable(Of Long)

Parameters

value
Nullable<Int64>

The nullable Int64 value.

propertyName
String

The name of the property that is being validated.

Returns

The nullable Int64 value being set.

Attributes

Applies to

SetValidValue(Nullable<UInt64>, String)

Important

This API is not CLS-compliant.

Makes sure the UInt64 value being set for a property is valid.

[System.CLSCompliant(false)]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="propertyName")]
protected internal static Nullable<ulong> SetValidValue (Nullable<ulong> value, string propertyName);
static member SetValidValue : Nullable<uint64> * string -> Nullable<uint64>
Protected Friend Shared Function SetValidValue (value As Nullable(Of ULong), propertyName As String) As Nullable(Of ULong)

Parameters

value
Nullable<UInt64>

The nullable UInt64 value.

propertyName
String

The name of the property that is being validated.

Returns

The nullable UInt64 value being set.

Attributes

Applies to

SetValidValue(Nullable<Single>, String)

Makes sure the Single value being set for a property is valid.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="propertyName")]
protected internal static Nullable<float> SetValidValue (Nullable<float> value, string propertyName);
static member SetValidValue : Nullable<single> * string -> Nullable<single>
Protected Friend Shared Function SetValidValue (value As Nullable(Of Single), propertyName As String) As Nullable(Of Single)

Parameters

value
Nullable<Single>

The nullable Single value.

propertyName
String

The name of the property that is being validated.

Returns

The nullable Single value being set.

Attributes

Applies to

SetValidValue(String, Boolean, String)

Validates that the property is not null, and throws if it is.

protected internal static string SetValidValue (string value, bool isNullable, string propertyName);
static member SetValidValue : string * bool * string -> string
Protected Friend Shared Function SetValidValue (value As String, isNullable As Boolean, propertyName As String) As String

Parameters

value
String

The string value to be checked.

isNullable
Boolean

Flag indicating if this property is allowed to be null.

propertyName
String

The name of the property that is being validated.

Returns

The validated property.

Exceptions

The string value is null for a non-nullable string.

Applies to

SetValidValue(DbGeometry, Boolean, String)

Validates that the property is not null, and throws if it is.

protected internal static System.Data.Entity.Spatial.DbGeometry SetValidValue (System.Data.Entity.Spatial.DbGeometry value, bool isNullable, string propertyName);
static member SetValidValue : System.Data.Entity.Spatial.DbGeometry * bool * string -> System.Data.Entity.Spatial.DbGeometry
Protected Friend Shared Function SetValidValue (value As DbGeometry, isNullable As Boolean, propertyName As String) As DbGeometry

Parameters

value
DbGeometry

DbGeometry value to be checked.

isNullable
Boolean

Flag indicating if this property is allowed to be null.

propertyName
String

The name of the property that is being validated.

Returns

The DbGeometry value being set.

Exceptions

The value is null for a non-nullable property.

Applies to

SetValidValue(DbGeography, Boolean, String)

Validates that the property is not null, and throws if it is.

protected internal static System.Data.Entity.Spatial.DbGeography SetValidValue (System.Data.Entity.Spatial.DbGeography value, bool isNullable, string propertyName);
static member SetValidValue : System.Data.Entity.Spatial.DbGeography * bool * string -> System.Data.Entity.Spatial.DbGeography
Protected Friend Shared Function SetValidValue (value As DbGeography, isNullable As Boolean, propertyName As String) As DbGeography

Parameters

value
DbGeography

The DbGeography value to be checked.

isNullable
Boolean

Flag indicating if this property is allowed to be null.

propertyName
String

Name of the property that is being validated.

Returns

The DbGeography value being set.

Exceptions

The value is null for a non-nullable property.

Applies to

SetValidValue(Byte[], Boolean, String)

Makes sure the System.Byte[] value being set for a property is valid.

protected internal static byte[] SetValidValue (byte[] value, bool isNullable, string propertyName);
static member SetValidValue : byte[] * bool * string -> byte[]
Protected Friend Shared Function SetValidValue (value As Byte(), isNullable As Boolean, propertyName As String) As Byte()

Parameters

value
Byte[]

The value passed into the property setter.

isNullable
Boolean

Flag indicating if this property is allowed to be null.

propertyName
String

The name of the property that is being validated.

Returns

Byte[]

The Byte value being validated.

Exceptions

If value is null for a non nullable value.

Applies to

SetValidValue(UInt64, String)

Important

This API is not CLS-compliant.

Makes sure the UInt64 value being set for a property is valid.

[System.CLSCompliant(false)]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="propertyName")]
protected internal static ulong SetValidValue (ulong value, string propertyName);
static member SetValidValue : uint64 * string -> uint64
Protected Friend Shared Function SetValidValue (value As ULong, propertyName As String) As ULong

Parameters

value
UInt64

The UInt64 value.

propertyName
String

The name of the property that is being validated.

Returns

The UInt64 value being set.

Attributes

Applies to

SetValidValue(UInt32, String)

Important

This API is not CLS-compliant.

Makes sure the UInt32 value being set for a property is valid.

[System.CLSCompliant(false)]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="propertyName")]
protected internal static uint SetValidValue (uint value, string propertyName);
static member SetValidValue : uint32 * string -> uint32
Protected Friend Shared Function SetValidValue (value As UInteger, propertyName As String) As UInteger

Parameters

value
UInt32

The UInt32 value.

propertyName
String

The name of the property that is being validated.

Returns

The UInt32 value being set.

Attributes

Applies to

SetValidValue(UInt16, String)

Important

This API is not CLS-compliant.

Makes sure the UInt16 value being set for a property is valid.

[System.CLSCompliant(false)]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="propertyName")]
protected internal static ushort SetValidValue (ushort value, string propertyName);
static member SetValidValue : uint16 * string -> uint16
Protected Friend Shared Function SetValidValue (value As UShort, propertyName As String) As UShort

Parameters

value
UInt16

The UInt16 value.

propertyName
String

The name of the property that is being validated.

Returns

The UInt16 value being set.

Attributes

Applies to

SetValidValue(TimeSpan, String)

Makes sure the TimeSpan value being set for a property is valid.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="propertyName")]
protected internal static TimeSpan SetValidValue (TimeSpan value, string propertyName);
static member SetValidValue : TimeSpan * string -> TimeSpan
Protected Friend Shared Function SetValidValue (value As TimeSpan, propertyName As String) As TimeSpan

Parameters

value
TimeSpan

The TimeSpan value.

propertyName
String

The name of the property that is being validated.

Returns

The TimeSpan value being set.

Attributes

Applies to

SetValidValue(String, Boolean)

Validates that the property is not null, and throws if it is.

protected internal static string SetValidValue (string value, bool isNullable);
static member SetValidValue : string * bool -> string
Protected Friend Shared Function SetValidValue (value As String, isNullable As Boolean) As String

Parameters

value
String

The string value to be checked.

isNullable
Boolean

Flag indicating if this property is allowed to be null.

Returns

The validated String value.

Applies to

SetValidValue(Single, String)

Makes sure the Single value being set for a property is valid.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="propertyName")]
protected internal static float SetValidValue (float value, string propertyName);
static member SetValidValue : single * string -> single
Protected Friend Shared Function SetValidValue (value As Single, propertyName As String) As Single

Parameters

value
Single

The Single value.

propertyName
String

The name of the property that is being validated.

Returns

The Single value being set.

Attributes

Applies to

SetValidValue(SByte, String)

Important

This API is not CLS-compliant.

Makes sure the SByte value being set for a property is valid.

[System.CLSCompliant(false)]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="propertyName")]
protected internal static sbyte SetValidValue (sbyte value, string propertyName);
static member SetValidValue : sbyte * string -> sbyte
Protected Friend Shared Function SetValidValue (value As SByte, propertyName As String) As SByte

Parameters

value
SByte

The SByte value.

propertyName
String

The name of the property that is being validated.

Returns

The SByte value being set.

Attributes

Applies to

SetValidValue(DateTime, String)

Makes sure the DateTime value being set for a property is valid.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="propertyName")]
protected internal static DateTime SetValidValue (DateTime value, string propertyName);
static member SetValidValue : DateTime * string -> DateTime
Protected Friend Shared Function SetValidValue (value As DateTime, propertyName As String) As DateTime

Parameters

value
DateTime

The DateTime value.

propertyName
String

The name of the property that is being validated.

Returns

The DateTime value being set.

Attributes

Applies to

SetValidValue(Nullable<UInt32>, String)

Important

This API is not CLS-compliant.

Makes sure the UInt32 value being set for a property is valid.

[System.CLSCompliant(false)]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="propertyName")]
protected internal static Nullable<uint> SetValidValue (Nullable<uint> value, string propertyName);
static member SetValidValue : Nullable<uint32> * string -> Nullable<uint32>
Protected Friend Shared Function SetValidValue (value As Nullable(Of UInteger), propertyName As String) As Nullable(Of UInteger)

Parameters

value
Nullable<UInt32>

The nullable UInt32 value.

propertyName
String

The name of the property that is being validated.

Returns

The nullable UInt32 value being set.

Attributes

Applies to

SetValidValue(Nullable<UInt16>, String)

Important

This API is not CLS-compliant.

Makes sure the UInt16 value being set for a property is valid.

[System.CLSCompliant(false)]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="propertyName")]
protected internal static Nullable<ushort> SetValidValue (Nullable<ushort> value, string propertyName);
static member SetValidValue : Nullable<uint16> * string -> Nullable<uint16>
Protected Friend Shared Function SetValidValue (value As Nullable(Of UShort), propertyName As String) As Nullable(Of UShort)

Parameters

value
Nullable<UInt16>

The nullable UInt16 value.

propertyName
String

The name of the property that is being validated.

Returns

The nullable UInt16 value being set.

Attributes

Applies to

SetValidValue(Nullable<TimeSpan>, String)

Makes sure the TimeSpan value being set for a property is valid.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="propertyName")]
protected internal static Nullable<TimeSpan> SetValidValue (Nullable<TimeSpan> value, string propertyName);
static member SetValidValue : Nullable<TimeSpan> * string -> Nullable<TimeSpan>
Protected Friend Shared Function SetValidValue (value As Nullable(Of TimeSpan), propertyName As String) As Nullable(Of TimeSpan)

Parameters

value
Nullable<TimeSpan>

The nullable TimeSpan value.

propertyName
String

The name of the property that is being validated.

Returns

The nullable TimeSpan value being set.

Attributes

Applies to

SetValidValue(Nullable<SByte>, String)

Important

This API is not CLS-compliant.

Makes sure the SByte value being set for a property is valid.

[System.CLSCompliant(false)]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="propertyName")]
protected internal static Nullable<sbyte> SetValidValue (Nullable<sbyte> value, string propertyName);
static member SetValidValue : Nullable<sbyte> * string -> Nullable<sbyte>
Protected Friend Shared Function SetValidValue (value As Nullable(Of SByte), propertyName As String) As Nullable(Of SByte)

Parameters

value
Nullable<SByte>

The nullable SByte value.

propertyName
String

The name of the property that is being validated.

Returns

The nullable SByte value being set.

Attributes

Applies to

SetValidValue(DbGeometry, Boolean)

Validates that the property is not null, and throws if it is.

protected internal static System.Data.Entity.Spatial.DbGeometry SetValidValue (System.Data.Entity.Spatial.DbGeometry value, bool isNullable);
static member SetValidValue : System.Data.Entity.Spatial.DbGeometry * bool -> System.Data.Entity.Spatial.DbGeometry
Protected Friend Shared Function SetValidValue (value As DbGeometry, isNullable As Boolean) As DbGeometry

Parameters

value
DbGeometry

The DbGeometry value to be checked.

isNullable
Boolean

Flag indicating if this property is allowed to be null.

Returns

The DbGeometry value being set.

Exceptions

The value is null for a non-nullable property.

Applies to

SetValidValue(UInt32)

Important

This API is not CLS-compliant.

Makes sure the UInt32 value being set for a property is valid.

[System.CLSCompliant(false)]
protected internal static uint SetValidValue (uint value);
static member SetValidValue : uint32 -> uint32
Protected Friend Shared Function SetValidValue (value As UInteger) As UInteger

Parameters

value
UInt32

The UInt32 value.

Returns

The UInt32 value being set.

Attributes

Applies to

SetValidValue(Byte[], Boolean)

Makes sure the System.Byte[] value being set for a property is valid.

protected internal static byte[] SetValidValue (byte[] value, bool isNullable);
static member SetValidValue : byte[] * bool -> byte[]
Protected Friend Shared Function SetValidValue (value As Byte(), isNullable As Boolean) As Byte()

Parameters

value
Byte[]

The value being set.

isNullable
Boolean

Indicates whether the property is nullable.

Returns

Byte[]

A Byte value being set.

Applies to

SetValidValue(Nullable<Decimal>)

Makes sure the Decimal value being set for a property is valid.

protected internal static Nullable<decimal> SetValidValue (Nullable<decimal> value);
static member SetValidValue : Nullable<decimal> -> Nullable<decimal>
Protected Friend Shared Function SetValidValue (value As Nullable(Of Decimal)) As Nullable(Of Decimal)

Parameters

value
Nullable<Decimal>

The nullable Decimal value.

Returns

The nullable Decimal value being set.

Applies to

SetValidValue(Nullable<DateTimeOffset>)

Makes sure the DateTimeOffset value being set for a property is valid.

protected internal static Nullable<DateTimeOffset> SetValidValue (Nullable<DateTimeOffset> value);
static member SetValidValue : Nullable<DateTimeOffset> -> Nullable<DateTimeOffset>
Protected Friend Shared Function SetValidValue (value As Nullable(Of DateTimeOffset)) As Nullable(Of DateTimeOffset)

Parameters

value
Nullable<DateTimeOffset>

The nullable DateTimeOffset value.

Returns

The nullable DateTimeOffset value being set.

Applies to

SetValidValue(Nullable<DateTime>)

Makes sure the DateTime value being set for a property is valid.

protected internal static Nullable<DateTime> SetValidValue (Nullable<DateTime> value);
static member SetValidValue : Nullable<DateTime> -> Nullable<DateTime>
Protected Friend Shared Function SetValidValue (value As Nullable(Of DateTime)) As Nullable(Of DateTime)

Parameters

value
Nullable<DateTime>

The nullable DateTime value.

Returns

The nullable DateTime value being set.

Applies to

SetValidValue(Nullable<Byte>)

Makes sure the Byte value being set for a property is valid.

protected internal static Nullable<byte> SetValidValue (Nullable<byte> value);
static member SetValidValue : Nullable<byte> -> Nullable<byte>
Protected Friend Shared Function SetValidValue (value As Nullable(Of Byte)) As Nullable(Of Byte)

Parameters

value
Nullable<Byte>

The nullable Byte value.

Returns

The nullable Byte value being set.

Applies to

SetValidValue(Nullable<Boolean>)

Makes sure the Boolean value being set for a property is valid.

protected internal static Nullable<bool> SetValidValue (Nullable<bool> value);
static member SetValidValue : Nullable<bool> -> Nullable<bool>
Protected Friend Shared Function SetValidValue (value As Nullable(Of Boolean)) As Nullable(Of Boolean)

Parameters

value
Nullable<Boolean>

The nullable Boolean value.

Returns

The nullable Boolean value being set.

Applies to

SetValidValue(Int64)

Makes sure the Int64 value being set for a property is valid.

protected internal static long SetValidValue (long value);
static member SetValidValue : int64 -> int64
Protected Friend Shared Function SetValidValue (value As Long) As Long

Parameters

value
Int64

The Int64 value.

Returns

The Int64 value being set.

Applies to

SetValidValue(Int32)

Makes sure the Int32 value being set for a property is valid.

protected internal static int SetValidValue (int value);
static member SetValidValue : int -> int
Protected Friend Shared Function SetValidValue (value As Integer) As Integer

Parameters

value
Int32

The Int32 value.

Returns

The Int32 value being set.

Applies to

SetValidValue(Int16)

Makes sure the Int16 value being set for a property is valid.

protected internal static short SetValidValue (short value);
static member SetValidValue : int16 -> int16
Protected Friend Shared Function SetValidValue (value As Short) As Short

Parameters

value
Int16

The Int16 value.

Returns

The Int16 value being set.

Applies to

SetValidValue(Guid)

Makes sure the Guid value being set for a property is valid.

protected internal static Guid SetValidValue (Guid value);
static member SetValidValue : Guid -> Guid
Protected Friend Shared Function SetValidValue (value As Guid) As Guid

Parameters

value
Guid

The Guid value.

Returns

The Guid value being set.

Applies to

SetValidValue(Double)

Makes sure the Double value being set for a property is valid.

protected internal static double SetValidValue (double value);
static member SetValidValue : double -> double
Protected Friend Shared Function SetValidValue (value As Double) As Double

Parameters

value
Double

The Double value.

Returns

The Double value being set.

Applies to

SetValidValue(Decimal)

Makes sure the Decimal value being set for a property is valid.

protected internal static decimal SetValidValue (decimal value);
static member SetValidValue : decimal -> decimal
Protected Friend Shared Function SetValidValue (value As Decimal) As Decimal

Parameters

value
Decimal

The Decimal value.

Returns

The Decimal value being set.

Applies to

SetValidValue(DateTimeOffset)

Makes sure the DateTimeOffset value being set for a property is valid.

protected internal static DateTimeOffset SetValidValue (DateTimeOffset value);
static member SetValidValue : DateTimeOffset -> DateTimeOffset
Protected Friend Shared Function SetValidValue (value As DateTimeOffset) As DateTimeOffset

Parameters

value
DateTimeOffset

The DateTimeOffset value.

Returns

A DateTimeOffset value being set.

Applies to

SetValidValue(DateTime)

Makes sure the DateTime value being set for a property is valid.

protected internal static DateTime SetValidValue (DateTime value);
static member SetValidValue : DateTime -> DateTime
Protected Friend Shared Function SetValidValue (value As DateTime) As DateTime

Parameters

value
DateTime

The DateTime value.

Returns

The DateTime value being set.

Applies to

SetValidValue(Byte)

Makes sure the Byte value being set for a property is valid.

protected internal static byte SetValidValue (byte value);
static member SetValidValue : byte -> byte
Protected Friend Shared Function SetValidValue (value As Byte) As Byte

Parameters

value
Byte

The value that is being validated.

Returns

The Byte value that is set.

Applies to

SetValidValue(Boolean)

Makes sure the Boolean value being set for a property is valid.

protected internal static bool SetValidValue (bool value);
static member SetValidValue : bool -> bool
Protected Friend Shared Function SetValidValue (value As Boolean) As Boolean

Parameters

value
Boolean

The Boolean value.

Returns

The Boolean value being set.

Applies to

SetValidValue(Nullable<Double>)

Makes sure the Double value being set for a property is valid.

protected internal static Nullable<double> SetValidValue (Nullable<double> value);
static member SetValidValue : Nullable<double> -> Nullable<double>
Protected Friend Shared Function SetValidValue (value As Nullable(Of Double)) As Nullable(Of Double)

Parameters

value
Nullable<Double>

The nullable Double value.

Returns

The nullable Double value being set.

Applies to

SetValidValue(DbGeography, Boolean)

Validates that the property is not null, and throws if it is.

protected internal static System.Data.Entity.Spatial.DbGeography SetValidValue (System.Data.Entity.Spatial.DbGeography value, bool isNullable);
static member SetValidValue : System.Data.Entity.Spatial.DbGeography * bool -> System.Data.Entity.Spatial.DbGeography
Protected Friend Shared Function SetValidValue (value As DbGeography, isNullable As Boolean) As DbGeography

Parameters

value
DbGeography

DbGeography value to be checked.

isNullable
Boolean

Flag indicating if this property is allowed to be null.

Returns

The DbGeography value being set.

Exceptions

The value is null for a non-nullable property.

Applies to

SetValidValue(Nullable<Guid>)

Makes sure the Guid value being set for a property is valid.

protected internal static Nullable<Guid> SetValidValue (Nullable<Guid> value);
static member SetValidValue : Nullable<Guid> -> Nullable<Guid>
Protected Friend Shared Function SetValidValue (value As Nullable(Of Guid)) As Nullable(Of Guid)

Parameters

value
Nullable<Guid>

The nullable Guid value.

Returns

The nullable Guid value being set.

Applies to

SetValidValue(Nullable<Int32>)

Makes sure the Int32 value being set for a property is valid.

protected internal static Nullable<int> SetValidValue (Nullable<int> value);
static member SetValidValue : Nullable<int> -> Nullable<int>
Protected Friend Shared Function SetValidValue (value As Nullable(Of Integer)) As Nullable(Of Integer)

Parameters

value
Nullable<Int32>

The nullable Int32 value.

Returns

The nullable Int32 value being set.

Applies to

SetValidValue(Byte, String)

Makes sure the Byte value being set for a property is valid.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="propertyName")]
protected internal static byte SetValidValue (byte value, string propertyName);
static member SetValidValue : byte * string -> byte
Protected Friend Shared Function SetValidValue (value As Byte, propertyName As String) As Byte

Parameters

value
Byte

The Byte value.

propertyName
String

The name of the property that is being validated.

Returns

A Byte that is set.

Attributes

Applies to

SetValidValue(Boolean, String)

Makes sure the Boolean value being set for a property is valid.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="propertyName")]
protected internal static bool SetValidValue (bool value, string propertyName);
static member SetValidValue : bool * string -> bool
Protected Friend Shared Function SetValidValue (value As Boolean, propertyName As String) As Boolean

Parameters

value
Boolean

The Boolean value.

propertyName
String

The name of the property that is being validated.

Returns

The Boolean value being set.

Attributes

Applies to

SetValidValue(UInt64)

Important

This API is not CLS-compliant.

Makes sure the UInt64 value being set for a property is valid.

[System.CLSCompliant(false)]
protected internal static ulong SetValidValue (ulong value);
static member SetValidValue : uint64 -> uint64
Protected Friend Shared Function SetValidValue (value As ULong) As ULong

Parameters

value
UInt64

The UInt64 value.

Returns

The UInt64 value being set.

Attributes

Applies to

SetValidValue(UInt16)

Important

This API is not CLS-compliant.

Makes sure the UInt16 value being set for a property is valid.

[System.CLSCompliant(false)]
protected internal static ushort SetValidValue (ushort value);
static member SetValidValue : uint16 -> uint16
Protected Friend Shared Function SetValidValue (value As UShort) As UShort

Parameters

value
UInt16

The UInt16 value.

Returns

The UInt16 value being set.

Attributes

Applies to

SetValidValue(TimeSpan)

Makes sure the TimeSpan value being set for a property is valid.

protected internal static TimeSpan SetValidValue (TimeSpan value);
static member SetValidValue : TimeSpan -> TimeSpan
Protected Friend Shared Function SetValidValue (value As TimeSpan) As TimeSpan

Parameters

value
TimeSpan

The TimeSpan value.

Returns

The TimeSpan value being set.

Applies to

SetValidValue(Single)

Makes sure the Single value being set for a property is valid.

protected internal static float SetValidValue (float value);
static member SetValidValue : single -> single
Protected Friend Shared Function SetValidValue (value As Single) As Single

Parameters

value
Single

The Single value.

Returns

The Single value being set.

Applies to

SetValidValue(Nullable<Int16>)

Makes sure the Int16 value being set for a property is valid.

protected internal static Nullable<short> SetValidValue (Nullable<short> value);
static member SetValidValue : Nullable<int16> -> Nullable<int16>
Protected Friend Shared Function SetValidValue (value As Nullable(Of Short)) As Nullable(Of Short)

Parameters

value
Nullable<Int16>

The nullable Int16 value.

Returns

The nullable Int16 value being set.

Applies to

SetValidValue(SByte)

Important

This API is not CLS-compliant.

Makes sure the SByte value being set for a property is valid.

[System.CLSCompliant(false)]
protected internal static sbyte SetValidValue (sbyte value);
static member SetValidValue : sbyte -> sbyte
Protected Friend Shared Function SetValidValue (value As SByte) As SByte

Parameters

value
SByte

The SByte value.

Returns

The SByte value being set.

Attributes

Applies to

SetValidValue(Nullable<UInt32>)

Important

This API is not CLS-compliant.

Makes sure the UInt32 value being set for a property is valid.

[System.CLSCompliant(false)]
protected internal static Nullable<uint> SetValidValue (Nullable<uint> value);
static member SetValidValue : Nullable<uint32> -> Nullable<uint32>
Protected Friend Shared Function SetValidValue (value As Nullable(Of UInteger)) As Nullable(Of UInteger)

Parameters

value
Nullable<UInt32>

The nullable UInt32 value.

Returns

The nullable UInt32 value being set.

Attributes

Applies to

SetValidValue(Nullable<UInt16>)

Important

This API is not CLS-compliant.

Makes sure the UInt16 value being set for a property is valid.

[System.CLSCompliant(false)]
protected internal static Nullable<ushort> SetValidValue (Nullable<ushort> value);
static member SetValidValue : Nullable<uint16> -> Nullable<uint16>
Protected Friend Shared Function SetValidValue (value As Nullable(Of UShort)) As Nullable(Of UShort)

Parameters

value
Nullable<UInt16>

The nullable UInt16 value.

Returns

The nullable UInt16 value being set.

Attributes

Applies to

SetValidValue(Nullable<TimeSpan>)

Makes sure the TimeSpan value being set for a property is valid.

protected internal static Nullable<TimeSpan> SetValidValue (Nullable<TimeSpan> value);
static member SetValidValue : Nullable<TimeSpan> -> Nullable<TimeSpan>
Protected Friend Shared Function SetValidValue (value As Nullable(Of TimeSpan)) As Nullable(Of TimeSpan)

Parameters

value
Nullable<TimeSpan>

The nullable TimeSpan value.

Returns

The nullable TimeSpan value being set.

Applies to

SetValidValue(Nullable<Single>)

Makes sure the Single value being set for a property is valid.

protected internal static Nullable<float> SetValidValue (Nullable<float> value);
static member SetValidValue : Nullable<single> -> Nullable<single>
Protected Friend Shared Function SetValidValue (value As Nullable(Of Single)) As Nullable(Of Single)

Parameters

value
Nullable<Single>

The nullable Single value.

Returns

The nullable Single value being set.

Applies to

SetValidValue(Nullable<SByte>)

Important

This API is not CLS-compliant.

Makes sure the SByte value being set for a property is valid.

[System.CLSCompliant(false)]
protected internal static Nullable<sbyte> SetValidValue (Nullable<sbyte> value);
static member SetValidValue : Nullable<sbyte> -> Nullable<sbyte>
Protected Friend Shared Function SetValidValue (value As Nullable(Of SByte)) As Nullable(Of SByte)

Parameters

value
Nullable<SByte>

The nullable SByte value.

Returns

The nullable SByte value being set.

Attributes

Applies to

SetValidValue(Nullable<Int64>)

Makes sure the Int64 value being set for a property is valid.

protected internal static Nullable<long> SetValidValue (Nullable<long> value);
static member SetValidValue : Nullable<int64> -> Nullable<int64>
Protected Friend Shared Function SetValidValue (value As Nullable(Of Long)) As Nullable(Of Long)

Parameters

value
Nullable<Int64>

The nullable Int64 value.

Returns

The nullable Int64 value being set.

Applies to

SetValidValue(Nullable<UInt64>)

Important

This API is not CLS-compliant.

Makes sure the UInt64 value being set for a property is valid.

[System.CLSCompliant(false)]
protected internal static Nullable<ulong> SetValidValue (Nullable<ulong> value);
static member SetValidValue : Nullable<uint64> -> Nullable<uint64>
Protected Friend Shared Function SetValidValue (value As Nullable(Of ULong)) As Nullable(Of ULong)

Parameters

value
Nullable<UInt64>

The nullable UInt64 value.

Returns

The nullable UInt64 value being set.

Attributes

Applies to

SetValidValue<T>(T, T, String)

Sets a complex object for the specified property.

protected internal T SetValidValue<T> (T oldValue, T newValue, string property) where T : System.Data.Entity.Core.Objects.DataClasses.ComplexObject;
member this.SetValidValue : 'T * 'T * string -> 'T (requires 'T :> System.Data.Entity.Core.Objects.DataClasses.ComplexObject)
Protected Friend Function SetValidValue(Of T As ComplexObject) (oldValue As T, newValue As T, property As String) As T

Type Parameters

T

The type of the object being replaced.

Parameters

oldValue
T

The original complex object for the property, if any.

newValue
T

The complex object is being set.

property
String

The complex property that is being set to the complex object.

Returns

T

A complex type that derives from complex object.

Applies to