Esempio 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();
 }
Esempio 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
     }));
 }
Esempio 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();
 }
Esempio 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));
        }
Esempio 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());
        }
Esempio 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);
 }
Esempio 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
                 });
 }
Esempio 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);
 }
Esempio 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));
 }