Esempio n. 1
0
        public ComponentMetadataView(ComponentMetadata metadata, AnalysisViewSettings settings)
        {
            OriginalMetadata = metadata;

            ElasticType             = metadata.ElasticType;
            BaseClassTemplate       = metadata.BaseClass;
            JsonPartFuncReturnClass = metadata.JsonPartFuncReturnClass;
            CamelCaseType           = ElasticType.ToCamelCase();
            ClassName     = CamelCaseType + settings.ClassNameSuffix;
            ComponentType = settings.ComponentTypeEnum + "." + ElasticType;
            Description   = metadata.Description + "\nsee " + metadata.ReferenceUrl;

            Properties = (metadata.Properties ?? Enumerable.Empty <ComponentMetadataProperty>())
                         .Select(p => new ComponentMetadataPropertyView(p)).ToList();
        }
        public ComponentMetadataView(ComponentMetadata metadata, AnalysisViewSettings settings)
        {
            OriginalMetadata = metadata;

            ElasticType = metadata.ElasticType;
            BaseClassTemplate = metadata.BaseClass;
            JsonPartFuncReturnClass = metadata.JsonPartFuncReturnClass;
            CamelCaseType = ElasticType.ToCamelCase();
            ClassName = CamelCaseType + settings.ClassNameSuffix;
            ComponentType = settings.ComponentTypeEnum + "." + ElasticType;
            Description = metadata.Description + "\nsee " + metadata.ReferenceUrl;

            Properties = (metadata.Properties ?? Enumerable.Empty<ComponentMetadataProperty>())
                            .Select(p => new ComponentMetadataPropertyView(p)).ToList();
        }