当前位置: 首页>>代码示例>>C#>>正文


C# Properties.ToString方法代码示例

本文整理汇总了C#中Properties.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Properties.ToString方法的具体用法?C# Properties.ToString怎么用?C# Properties.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Properties的用法示例。


在下文中一共展示了Properties.ToString方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: To

        public CypherCreate To(string relationship, Properties properties = null)
        {
            if (properties == null)
            {
                _sb.AppendFormat("-[:{0}]->", relationship);
            }
            else
            {
                _sb.AppendFormat("-[:{0} {1}]->", relationship, properties.ToString(false));
            }

            return this;
        }
开发者ID:kodo65,项目名称:Neo4jRestNet,代码行数:13,代码来源:CypherCreate.cs

示例2: From

        public CypherCreate From(string name, string relationship, Properties properties = null)
        {
            if (properties == null)
            {
                _sb.AppendFormat("<-[{0}:{1}]-", name, relationship);
            }
            else
            {
                _sb.AppendFormat("<-[{0}:{1} {2}]-", name, relationship, properties.ToString(false));
            }

            return this;
        }
开发者ID:kodo65,项目名称:Neo4jRestNet,代码行数:13,代码来源:CypherCreate.cs

示例3: SaveProperties

 public void SaveProperties(Properties properties)
 {
     var status = Neo4jRestApi.SetPropertiesOnRelationship(DbUrl, Id, properties.ToString());
     if (status != HttpStatusCode.NoContent)
     {
         throw new Exception(string.Format("Error setting properties on relationship (relationship id:{0} http response:{1})", Id, status));
     }
 }
开发者ID:yonglehou,项目名称:Neo4jRestNet,代码行数:8,代码来源:RestRelationshipStore.cs

示例4: CreateUniqueRelationship

        public Relationship CreateUniqueRelationship(ConnectionElement connection, Node startNode, Node endNode, string name, Properties properties, string indexName, string key, object value, IndexUniqueness uniqueness)
        {
            string response;
            var status = Neo4jRestApi.CreateUniqueRelationship(connection.DbUrl, startNode.Id, endNode.Id, name, properties.ToString(), indexName, key, value, uniqueness, out response);

            if (status == HttpStatusCode.Created)
            {
                return ParseRelationshipJson(response).First();
            }

            // Create unique relationship but index mapping already exists
            if (status == HttpStatusCode.OK)
            {
                return null;
            }

            throw new Exception(string.Format("Error creating relationship (http response:{0})", status));
        }
开发者ID:yonglehou,项目名称:Neo4jRestNet,代码行数:18,代码来源:RestRelationshipStore.cs

示例5: CreateRelationship

        public Relationship CreateRelationship(ConnectionElement connection, Node startNode, Node endNode, string name, Properties properties)
        {
            string response;
            var status = Neo4jRestApi.CreateRelationship(connection.DbUrl, startNode.Id, endNode.Id, name, properties.ToString(), out response);

            if (status != HttpStatusCode.Created)
            {
                throw new Exception(string.Format("Error creating relationship (http response:{0})", status));
            }

            return ParseRelationshipJson(response).First();
        }
开发者ID:yonglehou,项目名称:Neo4jRestNet,代码行数:12,代码来源:RestRelationshipStore.cs

示例6: switch

 public ActionVar this[Properties prop]
 {
     get
     {
         switch (prop)
         {
             case Properties._x: return X;
             case Properties._y: return Y;
             case Properties._xscale: return XScale;
             case Properties._yscale: return YScale;
             case Properties._currentframe: return CurrentFrame;
             case Properties._totalframes: return TotalFrames;
             case Properties._alpha: return Alpha;
             case Properties._visible: return Visible;
             case Properties._width: return Width;
             case Properties._height: return Height;
             case Properties._rotation: return Rotation;
             case Properties._target: return Target;
             case Properties._framesloaded: return FramesLoaded;
             case Properties._name: return Name;
             case Properties._droptarget: return DropTarget;
             case Properties._url: return Url;
             case Properties._highquality: return HighQuality;
             case Properties._focusrect: return FocusRect;
             case Properties._soundbuftime: return SoundBufTime;
             case Properties._quality: return Quality;
             case Properties._mousex: return MouseX;
             case Properties._mousey: return MouseY;
             default:
                 return new ActionVar();
         }
     }
     set
     {
         switch (prop)
         {
             case Properties._x: X = (float)value; break;
             case Properties._y: Y = (float)value; break;
             case Properties._xscale: XScale = (float)value; break;
             case Properties._yscale: YScale = (float)value; break;
             case Properties._alpha: Alpha = (float)value; break;
             case Properties._visible: Visible = (bool)value; break;
             case Properties._width: Width = (float)value; break;
             case Properties._height: Height = (float)value; break;
             case Properties._rotation: Rotation = (float)value; break;
             case Properties._name: SetName(value.String); break;
             case Properties._highquality: HighQuality = (int)value; break;
             case Properties._focusrect: FocusRect = (bool)value; break;
             case Properties._soundbuftime: SoundBufTime = (float)value; break;
             case Properties._quality: Quality = value.String; break;
             default:
                 RootClip.Trace("Unhandled property {0}!", prop.ToString());
                 break;
         }
     }
 }
开发者ID:kaldap,项目名称:XnaFlash,代码行数:56,代码来源:MovieClip.cs

示例7: CreateUniqueNode

        public Node CreateUniqueNode(ConnectionElement connection, Properties properties, string indexName, string key, object value)
        {
            string response;
            var status = Neo4jRestApi.CreateUniqueNode(connection.DbUrl, properties.ToString(), indexName, key, value, out response);

            if (status == HttpStatusCode.Created)
            {
                return ParseNodeJson(response).First();
            }

            // Create unique node but index mapping already exists
            if(status == HttpStatusCode.OK)
            {
                return null;
            }

            throw new Exception(string.Format("Error creating node (http response:{0})", status));
        }
开发者ID:kodo65,项目名称:Neo4jRestNet,代码行数:18,代码来源:RestNodeStore.cs

示例8: CreateRelationship

        public Relationship CreateRelationship(Node startNode, Node endNode, string relationshipType, Properties properties)
        {
            string response;
            var status = Neo4jRestApi.CreateRelationship(DbUrl,
                                                        startNode.Id,
                                                        endNode.Id,
                                                        relationshipType,
                                                        properties == null ? null : properties.ToString(),
                                                        out response);
            if (status != HttpStatusCode.Created)
            {
                throw new Exception(string.Format("Error creationg relationship on node (node id:{0} http response:{1})", Id, status));
            }

            return RestRelationshipStore.ParseRelationshipJson(response).First();
        }
开发者ID:kodo65,项目名称:Neo4jRestNet,代码行数:16,代码来源:RestNodeStore.cs

示例9: CreateNode

        public Node CreateNode(ConnectionElement connection, Properties properties)
        {
            string response;
            var status = Neo4jRestApi.CreateNode(connection.DbUrl, properties.ToString(), out response);

            if (status != HttpStatusCode.Created)
            {
                throw new Exception(string.Format("Error creating node (http response:{0})", status));
            }

            return ParseNodeJson(response).First();
        }
开发者ID:kodo65,项目名称:Neo4jRestNet,代码行数:12,代码来源:RestNodeStore.cs

示例10: SaveProperties

        public void SaveProperties(Properties properties)
        {
            var status = new StoreFactory().CreateNeo4jRestApi(_selfDbUrl).SetPropertiesOnRelationship(_selfDbUrl, Id, properties.ToString());
            if (status != HttpStatusCode.NoContent)
            {
                throw new Exception(string.Format("Error setting properties on relationship (relationship id:{0} http response:{1})", Id, status));
            }

            LoadProperties(true);
        }
开发者ID:jeremy3825,项目名称:Neo4jRestNet,代码行数:10,代码来源:Relationship.cs

示例11: Node

        public CypherCreate Node(string name, Properties properties)
        {
            _sb.AppendFormat(" ({0} {1})", name, properties.ToString(false));

            return this;
        }
开发者ID:kodo65,项目名称:Neo4jRestNet,代码行数:6,代码来源:CypherCreate.cs


注:本文中的Properties.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。