예제 #1
0
        public void AddDepends(TypeDescription description)
        {
            if (!this.pending)
                throw new InvalidProgramException();

            if (!this.depends.Contains(description))
                this.depends.AddLast(description);
        }
예제 #2
0
        public ListSerializer(bool isArray, Type elementType, Type listType, TypeDescription description)
        {
            if (description == null)
            {
                throw new ArgumentNullException("itemSerializer");
            }

            if (isArray == false && listType == null)
            {
                throw new ArgumentNullException("listType");
            }

            if (isArray == true && elementType == null)
            {
                throw new ArgumentNullException("elementType");
            }

            this.listType = listType;
            this.elementType = elementType;
            this.isArray = isArray;
            this.typeDescription = description;
        }
예제 #3
0
 public PropertySerializer(int fieldNumber, PropertyInfo propertyInfo, TypeDescription description)
 {
     this.fieldNumber = fieldNumber;
     this.propertyInfo = propertyInfo;
     this.typeDescription = description;
 }
예제 #4
0
 public FieldSerializer(int fieldNumber, FieldInfo fieldInfo, TypeDescription description)
 {
     this.fieldNumber = fieldNumber;
     this.fieldInfo = fieldInfo;
     this.typeDescription = description;
 }