本文整理汇总了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;
}
示例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;
}
示例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));
}
}
示例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));
}
示例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();
}
示例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;
}
}
}
示例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));
}
示例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();
}
示例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();
}
示例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);
}
示例11: Node
public CypherCreate Node(string name, Properties properties)
{
_sb.AppendFormat(" ({0} {1})", name, properties.ToString(false));
return this;
}