Пример #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 />");

            m_Properties.Add(property);
        }
Пример #2
0
        void Build(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 pptName = NameUtility.SlugifyConstName(property.name);

            m_Class.AddField(
                new CSField(
                    Scope.Private,
                    pptName,
                    "ClassProperty<" + property.type + ">",
                    "new DynamicClassProperty<" + property.type + ">(\"" + property.name + "\")",
                    CSField.Modifier.Static | CSField.Modifier.Readonly));
        }