Пример #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();
 }
Пример #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
     }));
 }
Пример #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();
 }
Пример #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));
        }
Пример #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());
        }
Пример #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);
 }
Пример #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
                 });
 }
Пример #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);
 }
Пример #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));
 }