예제 #1
0
        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);
        }
예제 #2
0
 public override Cluster GetFirstEmptyCluster()
 {
     return(Clusters.FirstOrDefault(_cluster => _cluster.Content is EmptyContentCluster));
 }
예제 #3
0
 private Cluster GetFirstEmptyCluster()
 {
     return(Clusters.FirstOrDefault(_cluster => _cluster.ClusterFile is EmptyClusterFile));
 }
예제 #4
0
 private Cluster GetClusterByFragmentFile(FragmentClusterFile _fragmentFile)
 {
     return(Clusters.FirstOrDefault(_cluster => _cluster.ClusterFile == _fragmentFile));
 }
예제 #5
0
 public Cluster GetClusterByFragmentFile(ContentFileCluster _fragmentFile)
 {
     return(Clusters.FirstOrDefault(_cluster => _cluster.Content == _fragmentFile));
 }