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())); }
public ControlColors Clone() { return(new ControlColors { Default = Default.Clone(), Hovering = Hovering.Clone(), Pressed = Pressed.Clone(), }); }
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); }
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); }
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); }
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() }); }