public static Instruction Create(Type type) { switch (type.GetNonNullableType().GetTypeCode()) { case TypeCode.Boolean: return(s_Boolean ?? (s_Boolean = new NotBoolean())); case TypeCode.Int64: return(s_Int64 ?? (s_Int64 = new NotInt64())); case TypeCode.Int32: return(s_Int32 ?? (s_Int32 = new NotInt32())); case TypeCode.Int16: return(s_Int16 ?? (s_Int16 = new NotInt16())); case TypeCode.UInt64: return(s_UInt64 ?? (s_UInt64 = new NotUInt64())); case TypeCode.UInt32: return(s_UInt32 ?? (s_UInt32 = new NotUInt32())); case TypeCode.UInt16: return(s_UInt16 ?? (s_UInt16 = new NotUInt16())); case TypeCode.Byte: return(s_Byte ?? (s_Byte = new NotByte())); case TypeCode.SByte: return(s_SByte ?? (s_SByte = new NotSByte())); default: throw Error.ExpressionNotSupportedForType("Not", type); } }
public static Instruction Create(Type type) { switch (Type.GetTypeCode(type.GetNonNullable())) { case TypeCode.Boolean: return(Boolean ?? (Boolean = new NotBoolean())); case TypeCode.Int64: return(Int64 ?? (Int64 = new NotInt64())); case TypeCode.Int32: return(Int32 ?? (Int32 = new NotInt32())); case TypeCode.Int16: return(Int16 ?? (Int16 = new NotInt16())); case TypeCode.UInt64: return(UInt64 ?? (UInt64 = new NotUInt64())); case TypeCode.UInt32: return(UInt32 ?? (UInt32 = new NotUInt32())); case TypeCode.UInt16: return(UInt16 ?? (UInt16 = new NotUInt16())); case TypeCode.Byte: return(Byte ?? (Byte = new NotByte())); case TypeCode.SByte: return(SByte ?? (SByte = new NotSByte())); default: throw ContractUtils.Unreachable; } }
public static Instruction Create(Type type) { Debug.Assert(!type.IsEnum()); switch (type.GetTypeCode()) { case TypeCode.Int16: return(_Int16 ?? (_Int16 = new NotInt16())); case TypeCode.Int32: return(_Int32 ?? (_Int32 = new NotInt32())); case TypeCode.Int64: return(_Int64 ?? (_Int64 = new NotInt64())); case TypeCode.UInt16: return(_UInt16 ?? (_UInt16 = new NotUInt16())); case TypeCode.UInt32: return(_UInt32 ?? (_UInt32 = new NotUInt32())); case TypeCode.UInt64: return(_UInt64 ?? (_UInt64 = new NotUInt64())); case TypeCode.Boolean: return(_Boolean ?? (_Boolean = new NotBoolean())); default: throw Assert.Unreachable; } }
public static Instruction Create(Type type) { switch (type.GetNonNullableType().GetTypeCode()) { case TypeCode.Boolean: return s_Boolean ?? (s_Boolean = new NotBoolean()); case TypeCode.Int64: return s_Int64 ?? (s_Int64 = new NotInt64()); case TypeCode.Int32: return s_Int32 ?? (s_Int32 = new NotInt32()); case TypeCode.Int16: return s_Int16 ?? (s_Int16 = new NotInt16()); case TypeCode.UInt64: return s_UInt64 ?? (s_UInt64 = new NotUInt64()); case TypeCode.UInt32: return s_UInt32 ?? (s_UInt32 = new NotUInt32()); case TypeCode.UInt16: return s_UInt16 ?? (s_UInt16 = new NotUInt16()); case TypeCode.Byte: return s_Byte ?? (s_Byte = new NotByte()); case TypeCode.SByte: return s_SByte ?? (s_SByte = new NotSByte()); default: throw Error.ExpressionNotSupportedForType("Not", type); } }
public static Instruction Create(Type type) { Debug.Assert(!type.IsEnum()); switch (type.GetTypeCode()) { case TypeCode.Int16: return _Int16 ?? (_Int16 = new NotInt16()); case TypeCode.Int32: return _Int32 ?? (_Int32 = new NotInt32()); case TypeCode.Int64: return _Int64 ?? (_Int64 = new NotInt64()); case TypeCode.UInt16: return _UInt16 ?? (_UInt16 = new NotUInt16()); case TypeCode.UInt32: return _UInt32 ?? (_UInt32 = new NotUInt32()); case TypeCode.UInt64: return _UInt64 ?? (_UInt64 = new NotUInt64()); case TypeCode.Boolean: return _Boolean ?? (_Boolean = new NotBoolean()); default: throw Assert.Unreachable; } }