protected BaseCore(char name, CoreType coreType, int startDurability) { this.Name = name; this.CoreType = coreType; this.StartDurability = startDurability; this.TottalDurability = this.StartDurability; this.Fragments = new ListStack<IFragment>(); }
public override void SetClient(CallbackCollection callbackCollection, bool SingleConnect) { _Type = CoreType.Client; _Callback = callbackCollection; _SingleConnect = SingleConnect; _BufferManager = new SimpleBuffer(); //_BufferManager = new MicrosoftBuffer(4096 * 3, 4096); }
protected Core(CoreType coreType, int maxDurability) { nameIntValue++; this.coreType = coreType; this.MaxDurability = maxDurability; this.fragments = new LStack(); this.Name = (char)nameIntValue; }
public int GetValue(CoreType type) { if (_info.ContainsKey(type)) { return(_info[type].Value(_state.CurLevel(type))); } return(-1); }
public int RequiredGold(CoreType type) { if (_info.ContainsKey(type)) { return(_info[type].Gold(_state.CurLevel(type))); } return(-1); }
public CoreMethod(CoreType declaringClass, string methodName, params CoreType[] ptypes) { Contract.ThrowIfNull(declaringClass); Contract.ThrowIfNull(methodName); this.DeclaringClass = declaringClass; this.MethodName = methodName; _ptypes = ptypes; }
public static string GetModuleName(Type type, CoreType coreType) { if (!type.Name.EndsWith(coreType.ToString())) { throw new CoreException(string.Format("[Core.GetModuleName]The {0} : {1} is not end with \"{2}\" ", coreType.ToString().ToLower(), type.Name, coreType.ToString())); } int length = type.Name.Length; return(type.Name.Substring(0, length - coreType.ToString().Length)); }
public CreateCoreCommand( IPowerPlant powerPlant, CoreType lateInstantiationCoreType, string lateInstantiationCoreName, int lateInstantiationCoreEnergyOutput) : base(powerPlant) { this.LateInstantiationCoreType = lateInstantiationCoreType; this.LateInstantiationCoreName = lateInstantiationCoreName; this.LateInstantiationCoreEnergyOutput = lateInstantiationCoreEnergyOutput; }
public static Core Create(CoreType coreType, Field field) { switch (coreType) { case CoreType.SgfCore: return new BasicCore(field); case CoreType.GroupsCore: return new GroupsCore(field); default: throw new NotImplementedException(); } }
public bool IsNeedReconfirm(CoreType type) { if (_isNeedReconfirm[type]) { _isNeedReconfirm[type] = false; return(true); } else { _isNeedReconfirm[type] = true; return(false); } }
private void filterSelection_ReloadForDate(object sender, EventArgs e) { CoreType item = ((CoreType)DirectiveSource).CloneAsDateOf(filterSelection.DateSelected); if (item is Aircraft) { CurrentAircraft = item as Aircraft; } if (item is BaseDetail) { CurrentBaseDetail = item as BaseDetail; Directive[] directives = GatherDirectives(additionalFilter); } }
//Function used to perform actual XML Deserialization. static public CoreType DeserializeXML(string XMLFilepath) { try { XmlSerializer serializer = new XmlSerializer(typeof(CoreType)); Stream reader1 = new FileStream(XMLFilepath, FileMode.Open); CoreType readData = (CoreType)serializer.Deserialize(reader1); reader1.Close(); return(readData); } catch (Exception ex) { throw new ApplicationException("\n\nError: 5001, Message: Ballard Arinc-429 Custom-Device, XML Deserialization: " + ex.Message); } }
public void ExportXml(ref XmlWriter xml) { xml.WriteStartElement("node"); xml.WriteAttributeString("name", Name); xml.WriteAttributeString("type", CoreType.ToString()); // tail must be joined because xml doesn't support duplicate attributes if (Tail.Count > 0) { xml.WriteAttributeString("metadata", string.Join(",", Tail)); } ExportXmlImpl(ref xml); xml.WriteFullEndElement(); }
public ICore CreateCore(char name, CoreType type, int durability) { ICore core = null; switch (type) { case CoreType.Para: core = new ParaBaseCore(name, durability); break; case CoreType.System: core = new SystemBaseCore(name, durability); break; default: throw new ArgumentException(Constants.MessageForFailedCreateCore); } return core; }
internal static StringBuilder ToJson(this IMetaObject o, StringBuilder b) { CoreType thisCoreType = o.GetCoreType(); switch (thisCoreType) { case CoreType.Value: b.Append("\"" + o.Value + "\""); break; case CoreType.Reference: b.Append(" { "); for (int i = 0; i < o.Properties.Count; i++) { IMetaObject m = o.Properties[i]; b.Append($"\"{m.Property.Name}\": "); m.ToJson(b); b.Append(','); } b.Append($"\"$ToString\": \"{o.Value}\""); b.Append('}'); break; case CoreType.Collection: b.Append(" [ "); for (int i = 0; i < o.CollectionItems.Count; i++) { IMetaObject m = o.CollectionItems[i]; m.ToJson(b); if (i != o.CollectionItems.Count - 1) { b.Append(','); } } b.Append(" ] "); break; } return(b); }
private object FromBytesCoreType(ref ByteReader reader, CoreType coreType, bool nullFlags) { //Core Types are skipped if null in an object property so null flags not necessary unless coreTypeCouldBeNull = true return(coreType switch { CoreType.Boolean => reader.ReadBoolean(), CoreType.Byte => reader.ReadByte(), CoreType.SByte => reader.ReadSByte(), CoreType.Int16 => reader.ReadInt16(), CoreType.UInt16 => reader.ReadUInt16(), CoreType.Int32 => reader.ReadInt32(), CoreType.UInt32 => reader.ReadUInt32(), CoreType.Int64 => reader.ReadInt64(), CoreType.UInt64 => reader.ReadUInt64(), CoreType.Single => reader.ReadSingle(), CoreType.Double => reader.ReadDouble(), CoreType.Decimal => reader.ReadDecimal(), CoreType.Char => reader.ReadChar(), CoreType.DateTime => reader.ReadDateTime(), CoreType.DateTimeOffset => reader.ReadDateTimeOffset(), CoreType.TimeSpan => reader.ReadTimeSpan(), CoreType.Guid => reader.ReadGuid(), CoreType.String => reader.ReadString(nullFlags), CoreType.BooleanNullable => reader.ReadBooleanNullable(nullFlags), CoreType.ByteNullable => reader.ReadByteNullable(nullFlags), CoreType.SByteNullable => reader.ReadSByteNullable(nullFlags), CoreType.Int16Nullable => reader.ReadInt16Nullable(nullFlags), CoreType.UInt16Nullable => reader.ReadUInt16Nullable(nullFlags), CoreType.Int32Nullable => reader.ReadInt32Nullable(nullFlags), CoreType.UInt32Nullable => reader.ReadUInt32Nullable(nullFlags), CoreType.Int64Nullable => reader.ReadInt64Nullable(nullFlags), CoreType.UInt64Nullable => reader.ReadUInt64Nullable(nullFlags), CoreType.SingleNullable => reader.ReadSingleNullable(nullFlags), CoreType.DoubleNullable => reader.ReadDoubleNullable(nullFlags), CoreType.DecimalNullable => reader.ReadDecimalNullable(nullFlags), CoreType.CharNullable => reader.ReadCharNullable(nullFlags), CoreType.DateTimeNullable => reader.ReadDateTimeNullable(nullFlags), CoreType.DateTimeOffsetNullable => reader.ReadDateTimeOffsetNullable(nullFlags), CoreType.TimeSpanNullable => reader.ReadTimeSpanNullable(nullFlags), CoreType.GuidNullable => reader.ReadGuidNullable(nullFlags), _ => throw new NotImplementedException(), });
private ConstructorInfo TryGetConstructor(CoreType attributeCoreType, params CoreType[] parameterCoreTypes) { int count = parameterCoreTypes.Length; Type attributeType = TryGetCoreType(attributeCoreType); if (attributeType == null) { return(null); } Type[] parameterTypes = new Type[count]; for (int i = 0; i < count; i++) { if ((parameterTypes[i] = TryGetCoreType(parameterCoreTypes[i])) == null) { return(null); } } const BindingFlags bf = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.ExactBinding; return(attributeType.GetConstructor(bf, null, parameterTypes, null)); }
public override void SetServer(string ip, int port, CallbackCollection callbackCollection, int MAX_LISTEN) { _BufferManager = new SimpleBuffer(); //_BufferManager = new MicrosoftBuffer(4096 * 10, 4096); _ConnectPool = new SocketAsyncPool(); _ConnectPool.Init(MAX_LISTEN); for (int i = 0; i < MAX_LISTEN; i++) { SocketAsyncEventArgs args = new SocketAsyncEventArgs(); args.Completed += new EventHandler <SocketAsyncEventArgs>(ProcessIO); //byte[] buf = new byte[4096]; _BufferManager.SetBuffer(args.SetBuffer, 4096); _ConnectPool.InitPush(args); } _IpAddress = ip != null? IPAddress.Parse(ip) : IPAddress.Any; _Port = port; _MAX_LISTEN = MAX_LISTEN; _Callback = callbackCollection; _Type = CoreType.Server; }
protected void Initialize(ITemplateDirectiveContainer currentItem) { TemplateDirectiveCollectionFilter filter = new TemplateDirectiveCollectionFilter(currentItem.ContainedDirectives, GetCollectionFilters()); if (currentItem is TemplateAircraft) { this.currentItem = (TemplateAircraft)currentItem; control = new TemplateDirectiveListScreen((TemplateAircraft)currentItem, filter, ReportTitileText); } if (currentItem is TemplateBaseDetail) { this.currentItem = (TemplateBaseDetail)currentItem; control = new TemplateDirectiveListScreen((TemplateBaseDetail)currentItem, filter, ReportTitileText); } control.CurrentDirectiveType = DirectiveDefaultType; if (control != null) { control.ReportText = ReportTitileText; control.Dock = DockStyle.Fill; Controls.Add(control); Dock = DockStyle.Fill; } }
public ParaCore(CoreType type, int durability) : base(type, durability / 3) { this.Type = CoreType.Para; }
public static void GetFullName(this CoreType coreType, out ReadOnlySpan <byte> ns, out ReadOnlySpan <byte> name) { switch (coreType) { case CoreType.Array: ns = Utf8Constants.System; name = Utf8Constants.Array; return; case CoreType.Boolean: ns = Utf8Constants.System; name = Utf8Constants.Boolean; return; case CoreType.Byte: ns = Utf8Constants.System; name = Utf8Constants.Byte; return; case CoreType.Char: ns = Utf8Constants.System; name = Utf8Constants.Char; return; case CoreType.Double: ns = Utf8Constants.System; name = Utf8Constants.Double; return; case CoreType.Enum: ns = Utf8Constants.System; name = Utf8Constants.Enum; return; case CoreType.Int16: ns = Utf8Constants.System; name = Utf8Constants.Int16; return; case CoreType.Int32: ns = Utf8Constants.System; name = Utf8Constants.Int32; return; case CoreType.Int64: ns = Utf8Constants.System; name = Utf8Constants.Int64; return; case CoreType.IntPtr: ns = Utf8Constants.System; name = Utf8Constants.IntPtr; return; case CoreType.NullableT: ns = Utf8Constants.System; name = Utf8Constants.NullableT; return; case CoreType.Object: ns = Utf8Constants.System; name = Utf8Constants.Object; return; case CoreType.SByte: ns = Utf8Constants.System; name = Utf8Constants.SByte; return; case CoreType.Single: ns = Utf8Constants.System; name = Utf8Constants.Single; return; case CoreType.String: ns = Utf8Constants.System; name = Utf8Constants.String; return; case CoreType.TypedReference: ns = Utf8Constants.System; name = Utf8Constants.TypedReference; return; case CoreType.UInt16: ns = Utf8Constants.System; name = Utf8Constants.UInt16; return; case CoreType.UInt32: ns = Utf8Constants.System; name = Utf8Constants.UInt32; return; case CoreType.UInt64: ns = Utf8Constants.System; name = Utf8Constants.UInt64; return; case CoreType.UIntPtr: ns = Utf8Constants.System; name = Utf8Constants.UIntPtr; return; case CoreType.ValueType: ns = Utf8Constants.System; name = Utf8Constants.ValueType; return; case CoreType.Void: ns = Utf8Constants.System; name = Utf8Constants.Void; return; case CoreType.MulticastDelegate: ns = Utf8Constants.System; name = Utf8Constants.MulticastDelegate; return; case CoreType.IEnumerableT: ns = Utf8Constants.SystemCollectionsGeneric; name = Utf8Constants.IEnumerableT; return; case CoreType.ICollectionT: ns = Utf8Constants.SystemCollectionsGeneric; name = Utf8Constants.ICollectionT; return; case CoreType.IListT: ns = Utf8Constants.SystemCollectionsGeneric; name = Utf8Constants.IListT; return; case CoreType.IReadOnlyListT: ns = Utf8Constants.SystemCollectionsGeneric; name = Utf8Constants.IReadOnlyListT; return; case CoreType.Type: ns = Utf8Constants.System; name = Utf8Constants.Type; return; case CoreType.DBNull: ns = Utf8Constants.System; name = Utf8Constants.DBNull; return; case CoreType.Decimal: ns = Utf8Constants.System; name = Utf8Constants.Decimal; return; case CoreType.DateTime: ns = Utf8Constants.System; name = Utf8Constants.DateTime; return; case CoreType.ComImportAttribute: ns = Utf8Constants.SystemRuntimeInteropServices; name = Utf8Constants.ComImportAttribute; return; case CoreType.DllImportAttribute: ns = Utf8Constants.SystemRuntimeInteropServices; name = Utf8Constants.DllImportAttribute; return; case CoreType.CallingConvention: ns = Utf8Constants.SystemRuntimeInteropServices; name = Utf8Constants.CallingConvention; return; case CoreType.CharSet: ns = Utf8Constants.SystemRuntimeInteropServices; name = Utf8Constants.CharSet; return; case CoreType.MarshalAsAttribute: ns = Utf8Constants.SystemRuntimeInteropServices; name = Utf8Constants.MarshalAsAttribute; return; case CoreType.UnmanagedType: ns = Utf8Constants.SystemRuntimeInteropServices; name = Utf8Constants.UnmanagedType; return; case CoreType.VarEnum: ns = Utf8Constants.SystemRuntimeInteropServices; name = Utf8Constants.VarEnum; return; case CoreType.InAttribute: ns = Utf8Constants.SystemRuntimeInteropServices; name = Utf8Constants.InAttribute; return; case CoreType.OutAttribute: ns = Utf8Constants.SystemRuntimeInteropServices; name = Utf8Constants.OutAttriubute; return; case CoreType.OptionalAttribute: ns = Utf8Constants.SystemRuntimeInteropServices; name = Utf8Constants.OptionalAttribute; return; case CoreType.PreserveSigAttribute: ns = Utf8Constants.SystemRuntimeInteropServices; name = Utf8Constants.PreserveSigAttribute; return; case CoreType.FieldOffsetAttribute: ns = Utf8Constants.SystemRuntimeInteropServices; name = Utf8Constants.FieldOffsetAttribute; return; default: Debug.Fail("Unexpected coreType passed to GetCoreTypeFullName: " + coreType); ns = name = default; return; } }
/// <summary> /// Returns a lazily created and cached Type instance corresponding to the indicated core type. This method returns null /// if the core assembly name wasn't supplied, the core assembly could not be loaded for some reason or if the specified /// type does not exist in the core assembly. /// </summary> internal RoType?TryGetCoreType(CoreType coreType) { CoreTypes coreTypes = GetAllFoundCoreTypes(); return(coreTypes[coreType]); }
public CoreExplicitCast(CoreType declaringClass, CoreType castTo) : base(declaringClass, WellKnownMemberNames.ExplicitConversionName, declaringClass) { _castTo = castTo; }
/// <summary> /// Creates the descriptor. /// </summary> /// <param name="declaringClass">Containing class.</param> /// <param name="name">Operator name, without <c>op_</c> prefix.</param> /// <param name="ptypes">CLR parameters.</param> public CoreOperator(CoreType declaringClass, string name, params CoreType[] ptypes) : base(declaringClass, name, ptypes) { Debug.Assert(name.StartsWith("op_")); }
public SystemCore(CoreType type, int durability) : base(type, durability) { this.Type = CoreType.System; }
public void OnNextCore(CoreType type) { _coreSubject.OnNext(type); }
/// <summary> /// Returns null if the specific core type did not exist or could not be loaded. Call GetException(coreType) to get detailed info. /// </summary> public RoType this[CoreType coreType] => _coreTypes[(int)coreType];
public Exception GetException(CoreType coreType) => _exceptions[(int)coreType];
private void ToBytesEnumType(object value, CoreType coreType, bool nullFlags, ref ByteWriter writer) { //Core Types are skipped if null in an object property so null flags not necessary unless nullFlags = true switch (coreType) { case CoreType.Byte: writer.Write((byte)value); return; case CoreType.SByte: writer.Write((sbyte)value); return; case CoreType.Int16: writer.Write((short)value); return; case CoreType.UInt16: writer.Write((ushort)value); return; case CoreType.Int32: writer.Write((int)value); return; case CoreType.UInt32: writer.Write((uint)value); return; case CoreType.Int64: writer.Write((long)value); return; case CoreType.UInt64: writer.Write((ulong)value); return; case CoreType.ByteNullable: writer.Write(value == null ? null : (byte?)(byte)value, nullFlags); return; case CoreType.SByteNullable: writer.Write(value == null ? null : (sbyte?)(sbyte)value, nullFlags); return; case CoreType.Int16Nullable: writer.Write(value == null ? null : (short?)(short)value, nullFlags); return; case CoreType.UInt16Nullable: writer.Write(value == null ? null : (ushort?)(ushort)value, nullFlags); return; case CoreType.Int32Nullable: writer.Write(value == null ? null : (int?)(int)value, nullFlags); return; case CoreType.UInt32Nullable: writer.Write(value == null ? null : (uint?)(uint)value, nullFlags); return; case CoreType.Int64Nullable: writer.Write(value == null ? null : (long?)(long)value, nullFlags); return; case CoreType.UInt64Nullable: writer.Write(value == null ? null : (ulong?)(ulong)value, nullFlags); return; default: throw new NotImplementedException(); } }
private void ToBytesEnumTypeEnumerable(IEnumerable values, int length, CoreType coreType, ref ByteWriter writer) { //Core Types are skipped if null in an object property so null flags not necessary unless nullFlags = true switch (coreType) { case CoreType.Byte: writer.WriteByteCast(values, length); return; case CoreType.SByte: writer.WriteSByteCast(values, length); return; case CoreType.Int16: writer.WriteInt16Cast(values, length); return; case CoreType.UInt16: writer.WriteUInt16Cast(values, length); return; case CoreType.Int32: writer.WriteInt32Cast(values, length); return; case CoreType.UInt32: writer.WriteUInt32Cast(values, length); return; case CoreType.Int64: writer.WriteInt64Cast(values, length); return; case CoreType.UInt64: writer.WriteUInt64Cast(values, length); return; case CoreType.ByteNullable: writer.WriteByteNullableCast(values, length); return; case CoreType.SByteNullable: writer.WriteSByteNullableCast(values, length); return; case CoreType.Int16Nullable: writer.WriteInt16NullableCast(values, length); return; case CoreType.UInt16Nullable: writer.WriteUInt16NullableCast(values, length); return; case CoreType.Int32Nullable: writer.WriteInt32NullableCast(values, length); return; case CoreType.UInt32Nullable: writer.WriteUInt32NullableCast(values, length); return; case CoreType.Int64Nullable: writer.WriteUInt64NullableCast(values, length); return; case CoreType.UInt64Nullable: writer.WriteUInt64NullableCast(values, length); return; default: throw new NotImplementedException(); } }
private void ToBytesCoreTypeEnumerable(IEnumerable values, int length, CoreType coreType, ref ByteWriter writer) { //Core Types are skipped if null in an object property so null flags not necessary unless nullFlags = true switch (coreType) { case CoreType.Boolean: writer.Write((IEnumerable <bool>)values, length); return; case CoreType.Byte: writer.Write((IEnumerable <byte>)values, length); return; case CoreType.SByte: writer.Write((IEnumerable <sbyte>)values, length); return; case CoreType.Int16: writer.Write((IEnumerable <short>)values, length); return; case CoreType.UInt16: writer.Write((IEnumerable <ushort>)values, length); return; case CoreType.Int32: writer.Write((IEnumerable <int>)values, length); return; case CoreType.UInt32: writer.Write((IEnumerable <uint>)values, length); return; case CoreType.Int64: writer.Write((IEnumerable <long>)values, length); return; case CoreType.UInt64: writer.Write((IEnumerable <ulong>)values, length); return; case CoreType.Single: writer.Write((IEnumerable <float>)values, length); return; case CoreType.Double: writer.Write((IEnumerable <double>)values, length); return; case CoreType.Decimal: writer.Write((IEnumerable <decimal>)values, length); return; case CoreType.Char: writer.Write((IEnumerable <char>)values, length); return; case CoreType.DateTime: writer.Write((IEnumerable <DateTime>)values, length); return; case CoreType.DateTimeOffset: writer.Write((IEnumerable <DateTimeOffset>)values, length); return; case CoreType.TimeSpan: writer.Write((IEnumerable <TimeSpan>)values, length); return; case CoreType.Guid: writer.Write((IEnumerable <Guid>)values, length); return; case CoreType.String: writer.Write((IEnumerable <string>)values, length); return; case CoreType.BooleanNullable: writer.Write((IEnumerable <bool?>)values, length); return; case CoreType.ByteNullable: writer.Write((IEnumerable <byte?>)values, length); return; case CoreType.SByteNullable: writer.Write((IEnumerable <sbyte?>)values, length); return; case CoreType.Int16Nullable: writer.Write((IEnumerable <short?>)values, length); return; case CoreType.UInt16Nullable: writer.Write((IEnumerable <ushort?>)values, length); return; case CoreType.Int32Nullable: writer.Write((IEnumerable <int?>)values, length); return; case CoreType.UInt32Nullable: writer.Write((IEnumerable <uint?>)values, length); return; case CoreType.Int64Nullable: writer.Write((IEnumerable <long?>)values, length); return; case CoreType.UInt64Nullable: writer.Write((IEnumerable <ulong?>)values, length); return; case CoreType.SingleNullable: writer.Write((IEnumerable <float?>)values, length); return; case CoreType.DoubleNullable: writer.Write((IEnumerable <double?>)values, length); return; case CoreType.DecimalNullable: writer.Write((IEnumerable <decimal?>)values, length); return; case CoreType.CharNullable: writer.Write((IEnumerable <char?>)values, length); return; case CoreType.DateTimeNullable: writer.Write((IEnumerable <DateTime?>)values, length); return; case CoreType.DateTimeOffsetNullable: writer.Write((IEnumerable <DateTimeOffset?>)values, length); return; case CoreType.TimeSpanNullable: writer.Write((IEnumerable <TimeSpan?>)values, length); return; case CoreType.GuidNullable: writer.Write((IEnumerable <Guid?>)values, length); return; default: throw new NotImplementedException(); } }
private void ToBytesCoreType(object value, CoreType coreType, bool nullFlags, ref ByteWriter writer) { //Core Types are skipped if null in an object property so null flags not necessary unless nullFlags = true switch (coreType) { case CoreType.Boolean: writer.Write((bool)value); return; case CoreType.Byte: writer.Write((byte)value); return; case CoreType.SByte: writer.Write((sbyte)value); return; case CoreType.Int16: writer.Write((short)value); return; case CoreType.UInt16: writer.Write((ushort)value); return; case CoreType.Int32: writer.Write((int)value); return; case CoreType.UInt32: writer.Write((uint)value); return; case CoreType.Int64: writer.Write((long)value); return; case CoreType.UInt64: writer.Write((ulong)value); return; case CoreType.Single: writer.Write((float)value); return; case CoreType.Double: writer.Write((double)value); return; case CoreType.Decimal: writer.Write((decimal)value); return; case CoreType.Char: writer.Write((char)value); return; case CoreType.DateTime: writer.Write((DateTime)value); return; case CoreType.DateTimeOffset: writer.Write((DateTimeOffset)value); return; case CoreType.TimeSpan: writer.Write((TimeSpan)value); return; case CoreType.Guid: writer.Write((Guid)value); return; case CoreType.String: writer.Write((string)value, nullFlags); return; case CoreType.BooleanNullable: writer.Write((bool?)value, nullFlags); return; case CoreType.ByteNullable: writer.Write((byte?)value, nullFlags); return; case CoreType.SByteNullable: writer.Write((sbyte?)value, nullFlags); return; case CoreType.Int16Nullable: writer.Write((short?)value, nullFlags); return; case CoreType.UInt16Nullable: writer.Write((ushort?)value, nullFlags); return; case CoreType.Int32Nullable: writer.Write((int?)value, nullFlags); return; case CoreType.UInt32Nullable: writer.Write((uint?)value, nullFlags); return; case CoreType.Int64Nullable: writer.Write((long?)value, nullFlags); return; case CoreType.UInt64Nullable: writer.Write((ulong?)value, nullFlags); return; case CoreType.SingleNullable: writer.Write((float?)value, nullFlags); return; case CoreType.DoubleNullable: writer.Write((double?)value, nullFlags); return; case CoreType.DecimalNullable: writer.Write((decimal?)value, nullFlags); return; case CoreType.CharNullable: writer.Write((char?)value, nullFlags); return; case CoreType.DateTimeNullable: writer.Write((DateTime?)value, nullFlags); return; case CoreType.DateTimeOffsetNullable: writer.Write((DateTimeOffset?)value, nullFlags); return; case CoreType.TimeSpanNullable: writer.Write((TimeSpan?)value, nullFlags); return; case CoreType.GuidNullable: writer.Write((Guid?)value, nullFlags); return; default: throw new NotImplementedException(); } }
/// <summary> /// Создается элемент - отображение директив заданного ВС /// </summary> /// <param name="currentItem"></param> public DispatcheredDirectivesView(Aircraft currentItem) : this(currentItem as IDirectiveContainer) { this.currentItem = currentItem; }
public CoreConstructor(CoreType declaringClass, params CoreType[] ptypes) : base(declaringClass, ".ctor", ptypes) { }
/// <summary> /// Создается элемент - отображение директив заданного базового агрегата /// </summary> public DispatcheredDirectivesView(BaseDetail currentItem) : this(currentItem as IDirectiveContainer, null) { this.currentItem = currentItem; }
public CoreProperty(CoreType declaringClass, string propertyName) { Contract.ThrowIfNull(declaringClass); Contract.ThrowIfNull(propertyName); this.DeclaringClass = declaringClass; this.PropertyName = propertyName; }
/// <summary> /// Создается элемент - отображение директив заданного ВС /// </summary> /// <param name="currentItem"></param> /// <param name="additionalFilter">Дополнительный фильтр</param> protected DispatcheredDirectivesView(Aircraft currentItem, DirectiveCollectionFilter additionalFilter) : this(currentItem as IDirectiveContainer, additionalFilter) { this.currentItem = currentItem; }
public int MaxLevel(CoreType type) { return(_level[type].Max.Value); }
public CoreField(CoreType declaringClass, string fldName) { Contract.ThrowIfNull(declaringClass); Contract.ThrowIfNull(fldName); this.DeclaringClass = declaringClass; this.FieldName = fldName; }