YAXLib.UdtWrapper.UdtWrapper C# (CSharp) Method

UdtWrapper() public method

Initializes a new instance of the UdtWrapper class.
public UdtWrapper ( Type udtType, YAXSerializer callerSerializer ) : System
udtType System.Type The underlying type to create the wrapper around.
callerSerializer YAXSerializer reference to the serializer /// instance which is building this instance.
return System
        public UdtWrapper(Type udtType, YAXSerializer callerSerializer)
        {
            m_isTypeDictionary = false;
            m_udtType = udtType;
            m_isTypeCollection = ReflectionUtils.IsCollectionType(m_udtType);
            m_isTypeDictionary = ReflectionUtils.IsIDictionary(m_udtType);

            Alias = StringUtils.RefineSingleElement(ReflectionUtils.GetTypeFriendlyName(m_udtType));
            Comment = null;
            FieldsToSerialize = YAXSerializationFields.PublicPropertiesOnly;
            IsAttributedAsNotCollection = false;

            SetYAXSerializerOptions(callerSerializer);

            foreach (var attr in m_udtType.GetCustomAttributes(true))
            {
                if (attr is YAXBaseAttribute)
                    ProcessYAXAttribute(attr);
            }
        }