Ejemplo n.º 1
0
 internal RemoteSingleEdge(ServiceSingleEdgeInstance mySvcEdgeInstance, IServiceToken myServiceToken) : base(mySvcEdgeInstance, myServiceToken)
 {
     _EdgeTypeID = mySvcEdgeInstance.TypeID;
     _EdgePropertyID = mySvcEdgeInstance.EdgePropertyID;
     _SourceVertex = new RemoteVertex(mySvcEdgeInstance.SourceVertex, _ServiceToken);
     _TargetVertex = new RemoteVertex(mySvcEdgeInstance.TargetVertex, _ServiceToken);
 }
Ejemplo n.º 2
0
 internal IHyperEdgeView ToHyperEdgeView(IServiceToken myServiceToken)
 {
     Dictionary<String, Object> properties = new Dictionary<string, object>();
     foreach (var item in this.PropertyList)
         properties.Add(item.Item1, item.Item2);
     return new HyperEdgeView(properties, this.Edges.Select(x => x.ToSingleEdgeView(myServiceToken)));
 }
Ejemplo n.º 3
0
 internal RemotePropertyDefinition(ServicePropertyDefinition mySvcPropertyDefinition, IServiceToken myServiceToken)
 {
     _ServiceToken = myServiceToken;
     this.IsMandatory = mySvcPropertyDefinition.IsMandatory;
     this.IsUserDefined = mySvcPropertyDefinition.IsUserDefined;
     this.IsUserDefinedType = mySvcPropertyDefinition.IsUserDefinedType;
     this.BaseType = Type.GetType(mySvcPropertyDefinition.BaseType);
     switch (mySvcPropertyDefinition.Multiplicity)
     {
         case ServicePropertyMultiplicity.Single:
             this.Multiplicity = PropertyMultiplicity.Single;
             break;
         case ServicePropertyMultiplicity.Set:
             this.Multiplicity = PropertyMultiplicity.Set;
             break;
         case ServicePropertyMultiplicity.List:
             this.Multiplicity = PropertyMultiplicity.List;
             break;
     }
     this._InIndices = mySvcPropertyDefinition.InIndices;
     this.DefaultValue = (IComparable)mySvcPropertyDefinition.DefaultValue;
     this.ID = mySvcPropertyDefinition.ID;
     this.Name = mySvcPropertyDefinition.Name;
     this.RelatedType = ConvertHelper.ToBaseType(mySvcPropertyDefinition.RelatedType, _ServiceToken);
     
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 检查JS SDK令牌。
 /// </summary>
 /// <returns></returns>
 public async Task CheckJavascriptToken()
 {
     if (JavascriptToken == null || JavascriptToken.ExpiredDate < DateTime.Now)
     {
         JavascriptToken = await RefreshJavascriptToken();
     }
 }
Ejemplo n.º 5
0
        internal RemotePropertyDefinition(ServicePropertyDefinition mySvcPropertyDefinition, IServiceToken myServiceToken)
        {
            _ServiceToken          = myServiceToken;
            this.IsMandatory       = mySvcPropertyDefinition.IsMandatory;
            this.IsUserDefined     = mySvcPropertyDefinition.IsUserDefined;
            this.IsUserDefinedType = mySvcPropertyDefinition.IsUserDefinedType;
            this.BaseType          = Type.GetType(mySvcPropertyDefinition.BaseType);
            switch (mySvcPropertyDefinition.Multiplicity)
            {
            case ServicePropertyMultiplicity.Single:
                this.Multiplicity = PropertyMultiplicity.Single;
                break;

            case ServicePropertyMultiplicity.Set:
                this.Multiplicity = PropertyMultiplicity.Set;
                break;

            case ServicePropertyMultiplicity.List:
                this.Multiplicity = PropertyMultiplicity.List;
                break;
            }
            this._InIndices   = mySvcPropertyDefinition.InIndices;
            this.DefaultValue = (IComparable)mySvcPropertyDefinition.DefaultValue;
            this.ID           = mySvcPropertyDefinition.ID;
            this.Name         = mySvcPropertyDefinition.Name;
            this.RelatedType  = ConvertHelper.ToBaseType(mySvcPropertyDefinition.RelatedType, _ServiceToken);
        }
Ejemplo n.º 6
0
        internal IVertexView ToVertexView(IServiceToken myServiceToken)
        {
            Dictionary <String, Object>    properties = new Dictionary <string, object>();
            Dictionary <String, IEdgeView> egdes      = new Dictionary <string, IEdgeView>();

            foreach (var item in this.Properties)
            {
                object value = ConvertHelper.ToDsObject(item.Item2, myServiceToken);
                if (value != null)
                {
                    properties.Add(item.Item1, value);
                }
                else
                {
                    properties.Add(item.Item1, item.Item2);
                }
            }

            foreach (var item in this.SingleEdges)
            {
                egdes.Add(item.Item1, item.Item2.ToSingleEdgeView(myServiceToken));
            }
            foreach (var item in this.HyperEdges)
            {
                egdes.Add(item.Item1, item.Item2.ToHyperEdgeView(myServiceToken));
            }
            return(new sones.GraphQL.Result.VertexView(properties, egdes));
        }
Ejemplo n.º 7
0
 internal RemoteVertex(ServiceVertexInstance myVertex, IServiceToken myServiceToken) : base(myServiceToken)
 {
     this._edition          = myVertex.Edition;
     this._vertexID         = myVertex.VertexID;
     this._vertexTypeID     = myVertex.TypeID;
     this._vertexRevisionID = myVertex.VertexRevisionID;
 }
Ejemplo n.º 8
0
 internal ISingleEdgeView ToSingleEdgeView(IServiceToken myServiceToken)
 {
     Dictionary<String, Object> properties = new Dictionary<string,object>();
     foreach(var item in this.PropertyList)
         properties.Add(item.Item1, item.Item2);
     return new SingleEdgeView(properties, this.TargetVertex.ToVertexView(myServiceToken));
 }
Ejemplo n.º 9
0
 internal RemoteSingleEdge(ServiceSingleEdgeInstance mySvcEdgeInstance, IServiceToken myServiceToken) : base(mySvcEdgeInstance, myServiceToken)
 {
     _EdgeTypeID     = mySvcEdgeInstance.TypeID;
     _EdgePropertyID = mySvcEdgeInstance.EdgePropertyID;
     _SourceVertex   = new RemoteVertex(mySvcEdgeInstance.SourceVertex, _ServiceToken);
     _TargetVertex   = new RemoteVertex(mySvcEdgeInstance.TargetVertex, _ServiceToken);
 }
 internal RemoteIncomingEdgeDefinition(ServiceIncomingEdgeDefinition myIncomingEdgeDefinition, IServiceToken myServiceToken)
 {
     this.RelatedEdgeDefinition = new RemoteOutgoingEdgeDefinition(myIncomingEdgeDefinition.RelatedEdgeDefinition, myServiceToken);
     this.Name = myIncomingEdgeDefinition.Name;
     this.ID = myIncomingEdgeDefinition.ID;
     this.IsUserDefined = myIncomingEdgeDefinition.IsUserDefined;
     this.RelatedType = ConvertHelper.ToBaseType(myIncomingEdgeDefinition.RelatedType, myServiceToken);
 }
 internal RemoteBinaryPropertyDefinition(ServiceBinaryPropertyDefinition myServiceBinaryPropertyDefinition, IServiceToken myServiceToken)
 {
     this._ServiceToken = myServiceToken;
     this.ID = myServiceBinaryPropertyDefinition.ID;
     this.Name = myServiceBinaryPropertyDefinition.Name;
     this.IsUserDefined = myServiceBinaryPropertyDefinition.IsUserDefined;
     this.RelatedType = ConvertHelper.ToBaseType(myServiceBinaryPropertyDefinition.RelatedType, myServiceToken);
 }
Ejemplo n.º 12
0
 internal RemoteHyperEdge(ServiceHyperEdgeInstance mySvcEdge, IServiceToken myServiceToken) : base(mySvcEdge, myServiceToken)
 {
     ContainedSingleEdges = new HashSet <ISingleEdge>();
     foreach (var item in mySvcEdge.SingleEdges)
     {
         ContainedSingleEdges.Add(new RemoteSingleEdge(item, myServiceToken));
     }
 }
Ejemplo n.º 13
0
 internal ARemoteBaseType(ServiceBaseType myServiceBaseType, IServiceToken myServiceToken)
 {
     _ServiceToken  = myServiceToken;
     _ID            = myServiceBaseType.ID;
     _Name          = myServiceBaseType.Name;
     _Comment       = myServiceBaseType.Comment;
     _IsUserDefined = myServiceBaseType.IsUserDefined;
 }
 internal RemoteBinaryPropertyDefinition(ServiceBinaryPropertyDefinition myServiceBinaryPropertyDefinition, IServiceToken myServiceToken)
 {
     this._ServiceToken = myServiceToken;
     this.ID            = myServiceBinaryPropertyDefinition.ID;
     this.Name          = myServiceBinaryPropertyDefinition.Name;
     this.IsUserDefined = myServiceBinaryPropertyDefinition.IsUserDefined;
     this.RelatedType   = ConvertHelper.ToBaseType(myServiceBinaryPropertyDefinition.RelatedType, myServiceToken);
 }
Ejemplo n.º 15
0
        internal ISingleEdgeView ToSingleEdgeView(IServiceToken myServiceToken)
        {
            Dictionary <String, Object> properties = new Dictionary <string, object>();

            foreach (var item in this.PropertyList)
            {
                properties.Add(item.Item1, item.Item2);
            }
            return(new SingleEdgeView(properties, this.TargetVertex.ToVertexView(myServiceToken)));
        }
Ejemplo n.º 16
0
        internal IHyperEdgeView ToHyperEdgeView(IServiceToken myServiceToken)
        {
            Dictionary <String, Object> properties = new Dictionary <string, object>();

            foreach (var item in this.PropertyList)
            {
                properties.Add(item.Item1, item.Item2);
            }
            return(new HyperEdgeView(properties, this.Edges.Select(x => x.ToSingleEdgeView(myServiceToken))));
        }
Ejemplo n.º 17
0
 internal static object ToDsObject(object mySvcObject, IServiceToken myServiceToken)
 {
     if (mySvcObject is ServicePropertyMultiplicity)
         return ToPropertyMultiplicity((ServicePropertyMultiplicity)mySvcObject);
     else if (mySvcObject is ServiceEdgeMultiplicity)
         return ToEdgeMultiplicity((ServiceEdgeMultiplicity)mySvcObject);
     else if (mySvcObject is ServiceIndexDefinition)
         return new RemoteIndexDefinition((ServiceIndexDefinition)mySvcObject, myServiceToken);
     else
         return null;
 }
 internal RemoteOutgoingEdgeDefinition(ServiceOutgoingEdgeDefinition myOutgoingEdgeDefinition, IServiceToken myServiceToken)
 {
     this.EdgeType = new RemoteEdgeType(myOutgoingEdgeDefinition.EdgeType, myServiceToken);
     this.InnerEdgeType = new RemoteEdgeType(myOutgoingEdgeDefinition.InnerEdgeType, myServiceToken);
     this.Multiplicity = (EdgeMultiplicity)myOutgoingEdgeDefinition.Multiplicity;
     this.SourceVertexType = new RemoteVertexType(myOutgoingEdgeDefinition.SourceVertexType, myServiceToken);
     this.TargetVertexType = new RemoteVertexType(myOutgoingEdgeDefinition.TargetVertexType, myServiceToken);
     this.Name = myOutgoingEdgeDefinition.Name;
     this.ID = myOutgoingEdgeDefinition.ID;
     this.RelatedType = ConvertHelper.ToBaseType(myOutgoingEdgeDefinition.RelatedType, myServiceToken);
     this.IsUserDefined = myOutgoingEdgeDefinition.IsUserDefined;
 }
Ejemplo n.º 19
0
 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;
 }
Ejemplo n.º 20
0
 internal RemoteIndexDefinition(ServiceIndexDefinition mySvcIndexDefinition, IServiceToken myServiceToken)
 {
     this._ServiceToken      = myServiceToken;
     this.Name               = mySvcIndexDefinition.Name;
     this.IndexTypeName      = mySvcIndexDefinition.IndexTypeName;
     this.Edition            = mySvcIndexDefinition.Edition;
     this.IsUserdefined      = mySvcIndexDefinition.IsUserdefined;
     this._IndexedProperties = mySvcIndexDefinition.IndexedProperties.ToList();
     this.VertexType         = new RemoteVertexType(mySvcIndexDefinition.VertexType, myServiceToken);
     this.ID          = mySvcIndexDefinition.ID;
     this.IsRange     = mySvcIndexDefinition.IsRange;
     this.IsVersioned = mySvcIndexDefinition.IsVersioned;
     this.SourceIndex = (mySvcIndexDefinition.SourceIndex == null) ? null : new RemoteIndexDefinition(mySvcIndexDefinition.SourceIndex, myServiceToken);
 }
Ejemplo n.º 21
0
 internal RemoteIndexDefinition(ServiceIndexDefinition mySvcIndexDefinition, IServiceToken myServiceToken)
 {
     this._ServiceToken = myServiceToken;
     this.Name = mySvcIndexDefinition.Name;
     this.IndexTypeName = mySvcIndexDefinition.IndexTypeName;
     this.Edition = mySvcIndexDefinition.Edition;
     this.IsUserdefined = mySvcIndexDefinition.IsUserdefined;
     this._IndexedProperties = mySvcIndexDefinition.IndexedProperties;
     this.VertexType = new RemoteVertexType(mySvcIndexDefinition.VertexType, myServiceToken);
     this.ID = mySvcIndexDefinition.ID;
     this.IsRange = mySvcIndexDefinition.IsRange;
     this.IsVersioned = mySvcIndexDefinition.IsVersioned;
     this.SourceIndex = (mySvcIndexDefinition.SourceIndex == null) ? null : new RemoteIndexDefinition(mySvcIndexDefinition.SourceIndex, myServiceToken);
 }
Ejemplo n.º 22
0
        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);
        }
Ejemplo n.º 23
0
        internal IVertexView ToVertexView(IServiceToken myServiceToken)
        {
            Dictionary<String, Object> properties = new Dictionary<string,object>();
            Dictionary<String, IEdgeView> egdes = new Dictionary<string,IEdgeView>();
            foreach (var item in this.Properties)
            {
                object value = ConvertHelper.ToDsObject(item.Item2, myServiceToken);
                if (value != null)
                    properties.Add(item.Item1, value);
                else
                    properties.Add(item.Item1, item.Item2);
            }

            foreach(var item in this.SingleEdges)
                egdes.Add(item.Item1, item.Item2.ToSingleEdgeView(myServiceToken));
            foreach(var item in this.HyperEdges)
                egdes.Add(item.Item1, item.Item2.ToHyperEdgeView(myServiceToken));
            return new sones.GraphQL.Result.VertexView(properties, egdes);
        }
Ejemplo n.º 24
0
 internal static object ToDsObject(object mySvcObject, IServiceToken myServiceToken)
 {
     if (mySvcObject is ServicePropertyMultiplicity)
     {
         return(ToPropertyMultiplicity((ServicePropertyMultiplicity)mySvcObject));
     }
     else if (mySvcObject is ServiceEdgeMultiplicity)
     {
         return(ToEdgeMultiplicity((ServiceEdgeMultiplicity)mySvcObject));
     }
     else if (mySvcObject is ServiceIndexDefinition)
     {
         return(new RemoteIndexDefinition((ServiceIndexDefinition)mySvcObject, myServiceToken));
     }
     else
     {
         return(null);
     }
 }
Ejemplo n.º 25
0
 internal static IAttributeDefinition ToAttributeDefinition(ServiceAttributeDefinition mySvcAttributeDefinition, IServiceToken myServiceToken)
 {
     IAttributeDefinition AttributeDefinition = null;
     switch(mySvcAttributeDefinition.Kind)
     {
         case ServiceAttributeType.Property:
             AttributeDefinition = new RemotePropertyDefinition((ServicePropertyDefinition)mySvcAttributeDefinition, myServiceToken);
             break;
         case ServiceAttributeType.BinaryProperty:
             throw new NotImplementedException();
         case ServiceAttributeType.IncomingEdge:
             AttributeDefinition = new RemoteIncomingEdgeDefinition((ServiceIncomingEdgeDefinition)mySvcAttributeDefinition, myServiceToken);
             break;
         case ServiceAttributeType.OutgoingEdge:
             AttributeDefinition = new RemoteOutgoingEdgeDefinition((ServiceOutgoingEdgeDefinition)mySvcAttributeDefinition, myServiceToken);
             break;
     }
     return AttributeDefinition;
 }
Ejemplo n.º 26
0
 internal IQueryResult ToQueryResult(IServiceToken myServiceToken)
 {
     ResultType type;
     if (this.TypeOfResult == ServiceResultType.Successful)
     {
         type = ResultType.Successful;
     }
     else
     {
         type = ResultType.Failed;
     }
     if (!String.IsNullOrEmpty(this.Error))
     {
         return new QueryResult(this.Query, this.NameOfQueryLanguage, this.Duration, type, this.Vertices.Select(x => x.ToVertexView(myServiceToken)), new RemoteException(this.Error));
     }
     else
     {
         return new QueryResult(this.Query, this.NameOfQueryLanguage, this.Duration, type, this.Vertices.Select(x => x.ToVertexView(myServiceToken)), null);
     }
 }
Ejemplo n.º 27
0
        /// <summary>
        /// 刷新JS SDK令牌。
        /// </summary>
        /// <returns>返回JS SDK令牌。</returns>
        public virtual async Task <IServiceToken> RefreshJavascriptToken()
        {
            await CheckServiceToken();

            string remoteToken = ServiceToken.Token;
            string result      = await HttpHelper.GetHttp(JavascriptTokenUrl, new
            {
                access_token = remoteToken,
                type         = "jsapi"
            });

            HandleJsonError(result);
            var item = new JavascriptToken();
            var doc  = JsonConvert.DeserializeXNode(result, "xml").Element("xml");

            item.Token       = doc.Element("ticket").Value;
            item.ExpiredDate = DateTime.Now.AddSeconds(int.Parse(doc.Element("expires_in").Value)).AddMinutes(-1);
            JavascriptToken  = item;
            return(item);
        }
Ejemplo n.º 28
0
        internal IQueryResult ToQueryResult(IServiceToken myServiceToken)
        {
            ResultType type;

            if (this.TypeOfResult == ServiceResultType.Successful)
            {
                type = ResultType.Successful;
            }
            else
            {
                type = ResultType.Failed;
            }
            if (!String.IsNullOrEmpty(this.Error))
            {
                return(new QueryResult(this.Query, this.NameOfQueryLanguage, this.Duration, type, this.Vertices.Select(x => x.ToVertexView(myServiceToken)), new RemoteException(this.Error)));
            }
            else
            {
                return(new QueryResult(this.Query, this.NameOfQueryLanguage, this.Duration, type, this.Vertices.Select(x => x.ToVertexView(myServiceToken)), null));
            }
        }
Ejemplo n.º 29
0
        internal static IAttributeDefinition ToAttributeDefinition(ServiceAttributeDefinition mySvcAttributeDefinition, IServiceToken myServiceToken)
        {
            IAttributeDefinition AttributeDefinition = null;

            if (mySvcAttributeDefinition != null)
            {
                switch (mySvcAttributeDefinition.Kind)
                {
                case ServiceAttributeType.Property:
                    AttributeDefinition = new RemotePropertyDefinition((ServicePropertyDefinition)mySvcAttributeDefinition, myServiceToken);
                    break;

                case ServiceAttributeType.BinaryProperty:
                    throw new NotImplementedException();

                case ServiceAttributeType.IncomingEdge:
                    AttributeDefinition = new RemoteIncomingEdgeDefinition((ServiceIncomingEdgeDefinition)mySvcAttributeDefinition, myServiceToken);
                    break;

                case ServiceAttributeType.OutgoingEdge:
                    AttributeDefinition = new RemoteOutgoingEdgeDefinition((ServiceOutgoingEdgeDefinition)mySvcAttributeDefinition, myServiceToken);
                    break;
                }
            }
            return(AttributeDefinition);
        }
Ejemplo n.º 30
0
 internal ARemoteGraphElement(IServiceToken myServiceToken)
 {
     _ServiceToken = myServiceToken;
 }
Ejemplo n.º 31
0
 internal RemoteEdgeType(ServiceEdgeType myServiceEdgeType, IServiceToken myServiceToken) : base(myServiceEdgeType, myServiceToken)
 {
 }
Ejemplo n.º 32
0
 internal RemoteUniqueDefinition(ServiceUniqueDefinition myUniqueDefinition, IServiceToken myServiceToken)
 {
     this.UniquePropertyDefinitions = myUniqueDefinition.UniquePropertyDefinition.Select(x => new RemotePropertyDefinition(x, myServiceToken));
     this.DefiningVertexType = new RemoteVertexType(myUniqueDefinition.DefiningVertexType, myServiceToken);
     this.CorrespondingIndex = new RemoteIndexDefinition(myUniqueDefinition.CorrespondingIndex, myServiceToken);
 }
Ejemplo n.º 33
0
        private byte[] EncryptServiceToken(IServiceToken serviceToken, byte[] sessionKey, User user)
        {
            byte[] iv = this.GenerateIV(user.PasswordHash, user.PasswordSalt);

            return this.Encrypt(sessionKey, iv, serviceToken);
        }
Ejemplo n.º 34
0
 internal RemoteUniqueDefinition(ServiceUniqueDefinition myUniqueDefinition, IServiceToken myServiceToken)
 {
     this.UniquePropertyDefinitions = myUniqueDefinition.UniquePropertyDefinition.Select(x => (IPropertyDefinition) new RemotePropertyDefinition(x, myServiceToken));
     this.DefiningVertexType        = new RemoteVertexType(myUniqueDefinition.DefiningVertexType, myServiceToken);
     this.CorrespondingIndex        = new RemoteIndexDefinition(myUniqueDefinition.CorrespondingIndex, myServiceToken);
 }
Ejemplo n.º 35
0
 internal ARemoteGraphElement(IServiceToken myServiceToken)
 {
     _ServiceToken = myServiceToken;
 }
Ejemplo n.º 36
0
 internal RemoteVertexType(ServiceVertexType myVertexType, IServiceToken myServiceToken)
     : base(myVertexType, myServiceToken)
 {
     _IsAbstract = myVertexType.IsAbstract;
 }
Ejemplo n.º 37
0
 internal RemoteIncomingEdgeDefinition(ServiceIncomingEdgeDefinition myIncomingEdgeDefinition, IServiceToken myServiceToken)
 {
     this.RelatedEdgeDefinition = new RemoteOutgoingEdgeDefinition(myIncomingEdgeDefinition.RelatedEdgeDefinition, myServiceToken);
     this.Name          = myIncomingEdgeDefinition.Name;
     this.ID            = myIncomingEdgeDefinition.ID;
     this.IsUserDefined = myIncomingEdgeDefinition.IsUserDefined;
     this.RelatedType   = ConvertHelper.ToBaseType(myIncomingEdgeDefinition.RelatedType, myServiceToken);
 }
Ejemplo n.º 38
0
        internal ISingleEdgeView ToSingleEdgeView(IServiceToken myServiceToken)
        {
            Dictionary <String, Object> properties = PropertyList;

            return(new SingleEdgeView(properties, this.TargetVertex.ToVertexView(myServiceToken)));
        }
Ejemplo n.º 39
0
 internal IHyperEdgeView ToHyperEdgeView(IServiceToken myServiceToken)
 {
     return new HyperEdgeView(this.PropertyList, this.Edges.Select(x => x.ToSingleEdgeView(myServiceToken)));
 }
Ejemplo n.º 40
0
		internal RemoteEdgeType(ServiceEdgeType myServiceEdgeType, IServiceToken myServiceToken) : base(myServiceEdgeType, myServiceToken)
		{ }
Ejemplo n.º 41
0
 internal ARemoteEdge(ServiceEdgeInstance myEdge, IServiceToken myServiceToken) : base(myServiceToken)
 {
     _EdgeTypeID   = myEdge.TypeID;
     _SourceVertex = new RemoteVertex(myEdge.SourceVertex, myServiceToken);
 }
Ejemplo n.º 42
0
 internal ISingleEdgeView ToSingleEdgeView(IServiceToken myServiceToken)
 {
     Dictionary<String, Object> properties = PropertyList;
     return new SingleEdgeView(properties, this.TargetVertex.ToVertexView(myServiceToken));
 }
Ejemplo n.º 43
0
 internal IHyperEdgeView ToHyperEdgeView(IServiceToken myServiceToken)
 {
     return(new HyperEdgeView(this.PropertyList, this.Edges.Select(x => x.ToSingleEdgeView(myServiceToken))));
 }
Ejemplo n.º 44
0
 internal RemoteVertexType(ServiceVertexType myVertexType, IServiceToken myServiceToken) : base(myVertexType, myServiceToken)
 {
     _IsAbstract = myVertexType.IsAbstract;
 }
 internal RemoteOutgoingEdgeDefinition(ServiceOutgoingEdgeDefinition myOutgoingEdgeDefinition, IServiceToken myServiceToken)
 {
     this.EdgeType      = new RemoteEdgeType(myOutgoingEdgeDefinition.EdgeType, myServiceToken);
     this.InnerEdgeType = (myOutgoingEdgeDefinition.InnerEdgeType == null) ?
                          null : new RemoteEdgeType(myOutgoingEdgeDefinition.InnerEdgeType, myServiceToken);
     this.Multiplicity     = ConvertHelper.ToEdgeMultiplicity(myOutgoingEdgeDefinition.Multiplicity);
     this.SourceVertexType = new RemoteVertexType(myOutgoingEdgeDefinition.SourceVertexType, myServiceToken);
     this.TargetVertexType = new RemoteVertexType(myOutgoingEdgeDefinition.TargetVertexType, myServiceToken);
     this.Name             = myOutgoingEdgeDefinition.Name;
     this.ID            = myOutgoingEdgeDefinition.ID;
     this.RelatedType   = ConvertHelper.ToBaseType(myOutgoingEdgeDefinition.RelatedType, myServiceToken);
     this.IsUserDefined = myOutgoingEdgeDefinition.IsUserDefined;
 }