Exemplo n.º 1
0
 public string[] GetLocations(DefinitionCacheItemType type)
 {
     var locations = new List<string>();
     visitAll(
         (item) => {
                 if (item.Type != type)
                     return;
                 if (locations.Contains(item.Location))
                     return;
                 locations.Add(item.Location);
             },
         _definitions);
     return locations.ToArray();
 }
Exemplo n.º 2
0
 public DefinitionCacheItem Append(DefinitionCacheItemType type, string location, DateTime updated, bool ovrride, bool required, string name, string description)
 {
     return
         (_parameterAppender(
              _parameters,
              new DefinitionCacheItem(_parameterAppender)
     {
         Type = type,
         Location = location,
         Updated = updated,
         Required = required,
         Override = ovrride,
         Name = name,
         Description = description
     }));
 }
Exemplo n.º 3
0
 public DefinitionLocation[] GetLocations(DefinitionCacheItemType type)
 {
     var locations = new List<DefinitionLocation>();
     visitAll(
         (item) => {
                 if (item.Type != type)
                     return;
                 if (locations.Any(x => x.Location == item.Location))
                     return;
                 locations.Add(new DefinitionLocation() {
                     Name = item.Name,
                     Location = item.Location
                 });
             },
         _definitions);
     return locations.ToArray();
 }
Exemplo n.º 4
0
        private DefinitionCacheItem add(DefinitionCacheItemType type, string location, DateTime updated, bool ovrride, bool required, string name, string description)
        {
            var item =
                new DefinitionCacheItem(parameterAppender)
            {
                Type        = type,
                Location    = location,
                Updated     = updated,
                Override    = ovrride,
                Required    = required,
                Name        = name,
                Description = description
            };

            if (item.Override)
            {
                _definitions.Add(item);
                return(item);
            }
            return(add(item));
        }
Exemplo n.º 5
0
        public DefinitionLocation[] GetLocations(DefinitionCacheItemType type)
        {
            var locations = new List <DefinitionLocation>();

            visitAll(
                (item) => {
                if (item.Type != type)
                {
                    return;
                }
                if (locations.Any(x => x.Location == item.Location))
                {
                    return;
                }
                locations.Add(new DefinitionLocation()
                {
                    Name     = item.Name,
                    Location = item.Location
                });
            },
                _definitions);
            return(locations.ToArray());
        }
Exemplo n.º 6
0
 public DefinitionCacheItem Add(DefinitionCacheItemType type, string location, DateTime updated, bool ovrride, bool required, string name, string description)
 {
     return add(type, location, updated, ovrride, required, name, description);
 }
Exemplo n.º 7
0
 public DefinitionCacheItem Append(DefinitionCacheItemType type, string location, DateTime updated, bool ovrride, bool required, string name, string description)
 {
     return
         _parameterAppender(
             _parameters,
             new DefinitionCacheItem(_parameterAppender) {
                     Type = type,
                     Location = location,
                     Updated = updated,
                     Required = required,
                     Name = name,
                     Description = description
                 });
 }
Exemplo n.º 8
0
 private DefinitionCacheItem add(DefinitionCacheItemType type, string location, DateTime updated, bool ovrride, bool required, string name, string description)
 {
     var item =
         new DefinitionCacheItem(parameterAppender) {
                 Type = type,
                 Location = location,
                 Updated = updated,
                 Override = ovrride,
                 Required = required,
                 Name = name,
                 Description = description
             };
     if (item.Override) {
         _definitions.Add(item);
         return item;
     }
     return add(item);
 }
Exemplo n.º 9
0
 public DefinitionCacheItem Add(DefinitionCacheItemType type, string location, DateTime updated, bool ovrride, bool required, string name, string description)
 {
     return(add(type, location, updated, ovrride, required, name, description));
 }