Simpl.Serialization.FieldDescriptor.RegisterPolymorphicDescriptor C# (CSharp) Method

RegisterPolymorphicDescriptor() private method

private RegisterPolymorphicDescriptor ( ClassDescriptor classDescriptor ) : void
classDescriptor ClassDescriptor
return void
        private void RegisterPolymorphicDescriptor(ClassDescriptor classDescriptor)
        {
            if (polymorphClassDescriptors == null)
                InitPolymorphicClassDescriptorsList(1);

            String classTag = classDescriptor.TagName;
            polymorphClassDescriptors.Put(classTag, classDescriptor);
            tlvClassDescriptors.Put(classTag.GetHashCode(), classDescriptor);

            if (otherTags != null)
                foreach (String otherTag in classDescriptor.OtherTags)
                {
                    if (!String.IsNullOrEmpty(otherTag))
                    {
                        polymorphClassDescriptors.Put(otherTag, classDescriptor);
                        tlvClassDescriptors.Put(otherTag.GetHashCode(), classDescriptor);
                    }
                }
        }