示例#1
0
 internal VertexTable GetRowForActiveVertex(string vertexName)
 {
     return(VertexTable.GetAll(_vertexTable)
            .Where(gn => vertexName == gn.VertexName && !string.IsNullOrEmpty(gn.InstanceName))
            .Where(gn => gn.IsActive)
            .First());
 }
示例#2
0
        internal void DeactivateVertexOnInstance(string vertexName, string instanceName)
        {
            var newActiveVertex = VertexTable.GetAll(_vertexTable)
                                  .Where(gn => instanceName == gn.InstanceName && vertexName == gn.VertexName)
                                  .First();

            newActiveVertex.IsActive = false;
            TableOperation insertOperation = TableOperation.InsertOrReplace(newActiveVertex);

            _vertexTable.ExecuteAsync(insertOperation).Wait();
        }
示例#3
0
        internal void ActivateVertexOnInstance(string vertexName, string instanceName)
        {
            var newActiveVertex = VertexTable.GetAll(_vertexTable)
                                  .Where(gn => instanceName == gn.InstanceName && vertexName == gn.VertexName)
                                  .First();

            newActiveVertex.IsActive = true;
            TableOperation insertOperation = TableOperation.InsertOrReplace(newActiveVertex);

            _vertexTable.ExecuteAsync(insertOperation).Wait();

            var procs = VertexTable.GetAll(_vertexTable)
                        .Where(gn => vertexName == gn.VertexName && instanceName != gn.InstanceName);

            foreach (var proc in procs)
            {
                if (proc.IsActive)
                {
                    proc.IsActive = false;
                    TableOperation _insertOperation = TableOperation.InsertOrReplace(proc);
                    _vertexTable.ExecuteAsync(_insertOperation).Wait();
                }
            }
        }
示例#4
0
 internal VertexTable GetRowForDefaultInstance()
 {
     return(VertexTable.GetAll(_vertexTable).Where(gn => string.IsNullOrEmpty(gn.VertexName)).First());
 }
示例#5
0
 internal VertexTable GetRowForInstanceVertex(string instanceName, string vertexName)
 {
     return(VertexTable.GetAll(_vertexTable).Where(gn => instanceName == gn.InstanceName && vertexName == gn.VertexName).First());
 }