示例#1
0
        public WebPackObject(WebDecoratorNames decorator,
                             WebPackSection section,
                             string path,
                             string fallbackPath,
                             object attributes = null)
        {
            if (decorator == null)
            {
                throw new ArgumentNullException(nameof(decorator));
            }

            if (path == null)
            {
                throw new ArgumentNullException(nameof(path));
            }

            if (fallbackPath == null)
            {
                throw new ArgumentNullException(nameof(fallbackPath));
            }

            Decorator    = decorator;
            Section      = section;
            Path         = path;
            FallbackPath = fallbackPath;
            Attributes   = attributes?.ToDictionary() ?? new Dictionary <string, object>();
        }
示例#2
0
 public PostWebPackObject(WebDecoratorNames decorator,
                          string path,
                          string fallbackPath,
                          object attributes = null)
     : base(decorator, WebPackSection.Post, path, fallbackPath, attributes)
 {
 }
示例#3
0
        public bool Equals(WebDecoratorNames other)
        {
            if ((object)other == null)
            {
                return(false);
            }

            if (object.ReferenceEquals(_tagName, other._tagName))
            {
                return(true);
            }

            return(string.Equals(_tagName, other._tagName, StringComparison.OrdinalIgnoreCase));
        }