예제 #1
0
 public Plugins <TPlugin> CloneAllThatApplyTo(TContext context)
 {
     return(new Plugins <TPlugin>(Plugins
                                  .Where(x => (x.AppliesTo?.Invoke(context) ?? true) || IsDefault(x))
                                  .Cast <Plugin <TPlugin> >()
                                  .Select(x => x.Clone()),
                                  Singleton, Default?.Clone()));
 }
예제 #2
0
 public ControlColors Clone()
 {
     return(new ControlColors
     {
         Default = Default.Clone(),
         Hovering = Hovering.Clone(),
         Pressed = Pressed.Clone(),
     });
 }
예제 #3
0
        public virtual ContainerSettings Copy()
        {
            ContainerSettings item = new ContainerSettings();

            item.Default          = (DefaultSettings)Default.Clone();
            item.AvailableOrderBy = AvailableOrderBy.ToList();
            item.AvailableGroupBy = AvailableGroupBy.ToList();
            item.AvailableViews   = AvailableViews.ToList();
            return(item);
        }
예제 #4
0
        public virtual object Clone()
        {
            ContainerSettings item = new ContainerSettings();

            item.Default          = (DefaultSettings)Default.Clone();
            item.AvailableOrderBy = AvailableOrderBy;
            item.AvailableGroupBy = AvailableGroupBy;
            item.AvailableViews   = AvailableViews;
            return(item);
        }
        /// <summary>
        ///     Create a deep clone for this object.
        /// </summary>
        /// <returns>A clone of this object.</returns>
        public PagerItemOptionsSet Clone()
        {
            var result = (PagerItemOptionsSet)MemberwiseClone();

            result.Default            = Default.Clone();
            result.Current            = Current.Clone();
            result.Normal             = Normal.Clone();
            result.Omitted            = Omitted.Clone();
            result.FirstPageButton    = FirstPageButton.Clone();
            result.LastPageButton     = LastPageButton.Clone();
            result.PreviousPageButton = PreviousPageButton.Clone();
            result.NextPageButton     = NextPageButton.Clone();

            return(result);
        }
예제 #6
0
        public override Config Clone()
        {
            var ret = new TextEditorsConfig
            {
                Default = (TextConfig)Default.Clone()
            };

            if (Configs != null)
            {
                ret.Configs = new Dictionary <String, TextConfig>(Configs);
                Configs.ForEach(kv => ret.Configs[kv.Key] = (TextConfig)kv.Value.Clone());
            }

            return(ret);
        }
예제 #7
0
 public TweetTheme Clone()
 {
     return(new TweetTheme
     {
         Default = Default.Clone(),
         Highlight = Highlight.Clone(),
         KeyText = KeyText,
         SubText = SubText,
         HyperlinkText = HyperlinkText,
         FavoriteCounter = FavoriteCounter,
         RetweetCounter = RetweetCounter,
         RetweetMarker = RetweetMarker,
         FavoriteAndRetweetButton = FavoriteAndRetweetButton.Clone(),
         FavoriteButton = FavoriteButton.Clone(),
         ColoredFavoriteButton = ColoredFavoriteButton.Clone(),
         RetweetButton = RetweetButton.Clone(),
         ColoredRetweetButton = ColoredRetweetButton.Clone(),
         MentionButton = MentionButton.Clone(),
         DeleteButton = DeleteButton.Clone()
     });
 }