System.Xml.Serialization.StructMapping.SetSequence C# (CSharp) Method

SetSequence() private method

private SetSequence ( ) : void
return void
        internal void SetSequence()
        {
            if (TypeDesc.IsRoot)
                return;

            StructMapping start = this;

            // find first mapping that does not have the sequence set
            while (start.BaseMapping != null && !start.BaseMapping.IsSequence && !start.BaseMapping.TypeDesc.IsRoot)
                start = start.BaseMapping;

            start.IsSequence = true;
            for (StructMapping derived = start.DerivedMappings; derived != null; derived = derived.NextDerivedMapping)
            {
                derived.SetSequence();
            }
        }

Usage Example

Example #1
0
 internal void SetSequence()
 {
     for (int i = 0; i < members.Length; i++)
     {
         if (members[i].IsParticle)
         {
             members[i].SequenceId = i;
         }
     }
     if (baseMapping != null)
     {
         baseMapping.SetSequence();
     }
 }
All Usage Examples Of System.Xml.Serialization.StructMapping::SetSequence