Exemple #1
0
 public void FillAllTypesInto(Profile destination)
 {
     foreach (var pair in _instances)
     {
         destination.FillTypeInto(pair.Key, pair.Value);
     }
 }
        private void setProfile(Profile profile)
        {
            lock (_locker)
            {
                _currentProfile = new Profile(profile.Name);
                profile.FillAllTypesInto(_currentProfile);

                if (!ReferenceEquals(profile, _default))
                {
                    _default.FillAllTypesInto(_currentProfile);
                }
            }
        }
        private Profile getProfile(string profileName)
        {
            if (!_profiles.ContainsKey(profileName))
            {
                var profile = new Profile(profileName);
                _profiles.Add(profileName, profile);
            }

            return _profiles[profileName];
        }
Exemple #4
0
 public void Merge(Profile destination)
 {
     foreach (var pair in _instances)
     {
         destination.SetDefault(pair.Key, pair.Value);
     }
 }
    public void FillDefault(Profile profile)
    {
        if (string.IsNullOrEmpty(DefaultInstanceKey))
            {
                return;
            }

            Instance defaultInstance = GetInstance(DefaultInstanceKey);
            if (defaultInstance == null)
            {
                Parent.Log.RegisterError(210, DefaultInstanceKey, PluginType);
            }

            profile.FillTypeInto(PluginType, defaultInstance);
    }
Exemple #6
0
        public Instance GetDefault(Type pluginType, string profileName)
        {
            Profile profile = getProfile(profileName);

            return(profile.GetDefault(pluginType));
        }