Пример #1
0
            private static Dictionary <string, object> ConvertToQuery(NodeRef nodeRef)
            {
                Dictionary <string, object> query = nodeRef.Parts
                                                    .ToDictionary(kvp => kvp.Key, kvp => (object)kvp.Value);

                query["nodeType"] = nodeRef.NodeType;

                return(query);
            }
Пример #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = (NodeRef != null ? NodeRef.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ IsDeleted.GetHashCode();
         hashCode = (hashCode * 397) ^ CreationTime.GetHashCode();
         hashCode = (hashCode * 397) ^ ModificationTime.GetHashCode();
         hashCode = (hashCode * 397) ^ (Properties != null ? Properties.GetHashCode() : 0);
         return(hashCode);
     }
 }
Пример #3
0
 /// <summary>
 ///   Removes a node with the specified reference.
 /// </summary>
 /// <param name="nodeRef">The node reference to look for.</param>
 public void Remove(NodeRef nodeRef)
 {
     _api.HttpHelper.Delete(_nodesUri, ConvertToQuery(nodeRef));
 }
Пример #4
0
 /// <summary>
 ///   Gets a node with the specified reference.
 /// </summary>
 /// <param name="nodeRef">The node reference to look for.</param>
 /// <returns>
 ///   A node with the specified reference.
 /// </returns>
 public Node Get(NodeRef nodeRef)
 {
     return(_api.HttpHelper.Get <Node>(_nodesUri, ConvertToQuery(nodeRef)));
 }