public Boolean TryGetCurrentContext(out CUser user, out CCluster cluster) { user = null; cluster = null; try { string contextName = CurrentContext; CContext context = Contexts.FirstOrDefault(c => c.Name == contextName); cluster = Clusters.FirstOrDefault(c => c.Name == context.ContextDetails.Cluster); user = Users.FirstOrDefault(u => u.Name == context.ContextDetails.User); } catch (Exception ex) { return(false); } return(true); }
public override Cluster GetFirstEmptyCluster() { return(Clusters.FirstOrDefault(_cluster => _cluster.Content is EmptyContentCluster)); }
private Cluster GetFirstEmptyCluster() { return(Clusters.FirstOrDefault(_cluster => _cluster.ClusterFile is EmptyClusterFile)); }
private Cluster GetClusterByFragmentFile(FragmentClusterFile _fragmentFile) { return(Clusters.FirstOrDefault(_cluster => _cluster.ClusterFile == _fragmentFile)); }
public Cluster GetClusterByFragmentFile(ContentFileCluster _fragmentFile) { return(Clusters.FirstOrDefault(_cluster => _cluster.Content == _fragmentFile)); }