示例#1
0
        public ResourceManifest Add()
        {
            var manifest = new ResourceManifest {
                Feature = Feature
            };

            ResourceManifests.Add(manifest);
            return(manifest);
        }
        public ResourceDefinition(ResourceManifest manifest, string type, string name)
        {
            Manifest      = manifest;
            Type          = type;
            Name          = name;
            TagBuilder    = new TagBuilder(_resourceTypeTagNames.ContainsKey(type) ? _resourceTypeTagNames[type] : "meta");
            TagRenderMode = _fileTagRenderModes.ContainsKey(TagBuilder.TagName) ? _fileTagRenderModes[TagBuilder.TagName] : TagRenderMode.Normal;
            Dictionary <string, string> attributes;

            if (_resourceAttributes.TryGetValue(type, out attributes))
            {
                foreach (var pair in attributes)
                {
                    TagBuilder.Attributes[pair.Key] = pair.Value;
                }
            }
            FilePathAttributeName = _filePathAttributes.ContainsKey(TagBuilder.TagName) ? _filePathAttributes[TagBuilder.TagName] : null;
        }