/// <summary> /// Adds a factory for a custom described type, usually for decoding. /// </summary> /// <param name="descriptor">The descriptor of the type.</param> /// <param name="ctor">The delegate to invoke to create the object.</param> public static void AddKnownDescribed(Descriptor descriptor, CreateDescribed ctor) { lock (knownDescrided) { knownDescrided.Add(descriptor.Name, ctor); knownDescrided.Add(descriptor.Code, ctor); } }
/// <summary> /// Initializes the described map object. /// </summary> /// <param name="descriptor">The descriptor of the concrete described map class.</param> /// <param name="keyType">The allowed key type.</param> protected DescribedMap(Descriptor descriptor, Type keyType) : base(descriptor) { this.keyType = keyType; this.map = new Map(); }
/// <summary> /// Initializes the described list object. /// </summary> /// <param name="descriptor">The descriptor of the concrete described list class.</param> /// <param name="fieldCount">The number of fields of the concrete described list class.</param> protected DescribedList(Descriptor descriptor, int fieldCount) : base(descriptor) { this.fields = new object[fieldCount]; }
/// <summary> /// Initializes the outcome object. /// </summary> /// <param name="descriptor">The descriptor of the concrete outcome class.</param> /// <param name="fieldCount">The number of fields of the concrete outcome class.</param> protected Outcome(Descriptor descriptor, int fieldCount) : base(descriptor, fieldCount) { }
/// <summary> /// Initializes the delivery state object. /// </summary> /// <param name="descriptor">The descriptor of the concrete delivery state class.</param> /// <param name="fieldCount">The number of fields of the concrete delivery state class.</param> protected DeliveryState(Descriptor descriptor, int fieldCount) : base(descriptor, fieldCount) { }
protected DescribedMap(Descriptor descriptor, Type keyType) : base(descriptor) { this.keyType = keyType; this.map = new Map(); }