public TResult CreateVertexType <TResult>(sones.Library.Commons.Security.SecurityToken mySecurityToken, long myTransactionID, sones.GraphDB.Request.RequestCreateVertexType myRequestCreateVertexType, sones.GraphDB.Request.Converter.CreateVertexTypeResultConverter <TResult> myOutputconverter) { Stopwatch RunningTime = Stopwatch.StartNew(); var svcVertexType = _GraphDSService.CreateVertexType(mySecurityToken, myTransactionID, new ServiceVertexTypePredefinition(myRequestCreateVertexType.VertexTypeDefinition)); var vertexType = new RemoteVertexType(svcVertexType, this); RunningTime.Stop(); return(myOutputconverter(new RequestStatistics(new TimeSpan(RunningTime.ElapsedTicks)), vertexType)); }
public TResult AlterVertexType <TResult>(SecurityToken mySecurityToken, long myTransactionID, sones.GraphDB.Request.RequestAlterVertexType myRequestAlterVertexType, sones.GraphDB.Request.Converter.AlterVertexTypeResultConverter <TResult> myOutputconverter) { Stopwatch RunningTime = Stopwatch.StartNew(); var svcVertexType = _GraphDSService.AlterVertexType(mySecurityToken, myTransactionID, new ServiceVertexType(myRequestAlterVertexType.TypeName), new ServiceAlterVertexChangeset(myRequestAlterVertexType)); var vertexType = new RemoteVertexType(svcVertexType, this); RunningTime.Stop(); return(myOutputconverter(new RequestStatistics(new TimeSpan(RunningTime.ElapsedTicks)), vertexType)); }
internal static IBaseType ToBaseType(ServiceBaseType myBaseType, IServiceToken myServiceToken) { IBaseType result = null; if (myBaseType is ServiceVertexType) { result = new RemoteVertexType((ServiceVertexType)myBaseType, myServiceToken); } else if (myBaseType is ServiceEdgeType) { result = new RemoteEdgeType((ServiceEdgeType)myBaseType, myServiceToken); } return(result); }
public TResult GetVertexType <TResult>(sones.Library.Commons.Security.SecurityToken mySecurityToken, long myTransactionID, sones.GraphDB.Request.RequestGetVertexType myRequestGetVertexType, sones.GraphDB.Request.Converter.GetVertexTypeResultConverter <TResult> myOutputconverter) { Stopwatch RunningTime = Stopwatch.StartNew(); ServiceVertexType svcVertexType; if (myRequestGetVertexType.VertexTypeName != null) { svcVertexType = _GraphDSService.GetVertexTypeByName(mySecurityToken, myTransactionID, myRequestGetVertexType.VertexTypeName); } else { svcVertexType = _GraphDSService.GetVertexTypeByID(mySecurityToken, myTransactionID, myRequestGetVertexType.VertexTypeID); } var vertexType = new RemoteVertexType(svcVertexType, this); RunningTime.Stop(); return(myOutputconverter(new RequestStatistics(new TimeSpan(RunningTime.ElapsedTicks)), vertexType)); }