Exemple #1
0
 public EdiStructure(EdiStructureType structureType, EdiStructure parent, EdiPropertyDescriptor property, object instance)
     : this(structureType,
            parent,
            property,
            instance,
            (structureType == EdiStructureType.Element && property.PathInfo.PathInternal.Element.HasIndex) ? property.PathInfo.PathInternal.Element.Index : 0,
            new Queue <EdiEntry>())
 {
 }
Exemple #2
0
 public EdiStructure(EdiStructureType structureType, EdiStructure parent, EdiPropertyDescriptor property, object instance, int index, Queue <EdiEntry> cache)
 {
     ValidationUtils.ArgumentNotNull(instance, "instance");
     _StructureType      = structureType;
     _Container          = parent;
     _Instance           = instance;
     _Index              = index;
     _Descriptor         = typeStore.Get(instance.GetType());
     _CachedReads        = cache;
     _Conditions         = Descriptor.Attributes.OfType <EdiConditionAttribute>().Concat(property?.Conditions ?? new EdiConditionAttribute[0]).ToArray();
     _ConditionStackMode = _Conditions.Length > 0 && (
         property?.ConditionStackMode == EdiConditionStackMode.Any ||
         Descriptor.Attributes.OfType <EdiAnyAttribute>().Any())
         ? EdiConditionStackMode.Any : EdiConditionStackMode.All;
 }
Exemple #3
0
 public EdiStructure(EdiStructureType structureType, EdiStructure parent, EdiPropertyDescriptor property, object instance)
     : this(structureType, parent, property, instance, 0, new Queue <EdiEntry>())
 {
 }