예제 #1
0
 /// <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);
     }
 }
예제 #2
0
 /// <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();
 }
예제 #3
0
 /// <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];
 }
예제 #4
0
 /// <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)
 {
 }
예제 #5
0
 /// <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)
 {
 }
예제 #6
0
 /// <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];
 }
예제 #7
0
 protected DescribedMap(Descriptor descriptor, Type keyType)
     : base(descriptor)
 {
     this.keyType = keyType;
     this.map     = new Map();
 }