Пример #1
0
        void VisitIn(DOMProperty property)
        {
            Assert.IsFalse(string.IsNullOrEmpty(property.type), "type is required for <property />");
            Assert.IsFalse(string.IsNullOrEmpty(property.name), "name is required for <property />");

            var fieldName = NameUtility.SlugifyFieldName(property.name);
            var pptName   = NameUtility.SlugifyConstName(property.name);

            var getterContent = property.getter != null ? property.getter.textContent : string.Empty;
            var setterContent = property.setter != null ? property.setter.textContent : string.Empty;

            GeneratePropertyInternal(property.type, property.name, fieldName, pptName, getterContent, setterContent);

            m_Class.AddField(new CSField(Scope.Private, fieldName, property.type, property.@default));
        }