Пример #1
0
 /// <summary>
 /// Initializes a new instance of <see cref="T:Dataweb.NShape.Advanced.EntityInnerObjectsDefinition" />.
 /// </summary>
 public EntityInnerObjectsDefinition(string name, string entityTypeName, string[] innerFieldNames, Type[] innerFieldTypes)
     : base(name)
 {
     if (innerFieldNames.Length != innerFieldTypes.Length)
     {
         throw new NShapeException("Number of field names does not match number of field types.");
     }
     this.entityTypeName = entityTypeName;
     this.fieldInfos     = new EntityFieldDefinition[innerFieldNames.Length];
     for (int i = 0; i < innerFieldNames.Length; ++i)
     {
         fieldInfos[i] = new EntityFieldDefinition(innerFieldNames[i], innerFieldTypes[i]);
     }
 }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of <see cref="T:Dataweb.NShape.Advanced.EntityInnerObjectsDefinition" />.
 /// </summary>
 public EntityInnerObjectsDefinition(string name, string entityTypeName, string[] innerFieldNames, Type[] innerFieldTypes)
     : base(name)
 {
     if (innerFieldNames.Length != innerFieldTypes.Length)
         throw new NShapeException("Number of field names does not match number of field types.");
     this.entityTypeName = entityTypeName;
     this.fieldInfos = new EntityFieldDefinition[innerFieldNames.Length];
     for (int i = 0; i < innerFieldNames.Length; ++i)
         fieldInfos[i] = new EntityFieldDefinition(innerFieldNames[i], innerFieldTypes[i]);
 }