示例#1
0
        public ConfigurationSet GetRawConfigData(string environment, out bool doSave)
        {
            var env = Environments.Single(e => e.Name.Equals(environment, StringComparison.OrdinalIgnoreCase));

            doSave = env.ETag.IsNullOrWhiteSpace();
            return(new ConfigurationSet
            {
                Created = Created,

                LastUpdated = LastUpdate,
                Environments = GetEnvironmentConfigs(environment),
                SetName = Id,
                ParentSet = ParentConfigSet.IsInstance() ? ParentConfigSet.Id : "",
                Endpoints = (from s in Services select s.GetRawConfigData(environment)).ToList(),
                Services = (from s in ServiceHosts select s.GetRawConfigData(environment)).ToList(),
                ReaderKey = ReaderKey,
                AllowMasterKeyAccess = AllowAccessWithRootKey,
                AllowUserToken = AllowAccessWithUserTokens,
                ETag = env.ETag.ContainsCharacters() ? env.ETag : DateTimeOffset.UtcNow.Ticks.ToString(),
                Version = $"{env.ConfigSet.Version}"
            });
        }