Esempio n. 1
0
        public UnionContext(TypeInfo rootType)
        {
            var unionKeyAttribute = rootType.GetCustomAttribute <UnionKeyAttribute>();

            _propertyName           = unionKeyAttribute.Key;
            _camelCasePropertyName  = Inflector.Camelize(_propertyName);
            _pascalCasePropertyName = Inflector.Pascalize(_propertyName);
            _dashCasePropertyName   = Inflector.Kebaberize(_propertyName);
            _enumType     = UnionHelper.GetUnionEnumType(rootType);
            _enumTypeList = UnionHelper.GetUnion(rootType);
        }