Наследование: TBase
Пример #1
0
 /// <summary>
 /// Changes an existing Tag.
 /// </summary>
 public int UpdateTag(Tag tag)
 {
     lock (this)
         using (var httpClient = GetHttpClient())
         {
             return GetNoteStoreClient(httpClient).updateTag(this.authToken, tag);
         }
 }
			///** Submits tag changes to the service. The provided data must include the tag's guid field for identification. The service will apply updates to the following tag fields: name, parentGuid
			// @param  tag The tag object containing the requested changes.
			// */
			public int UpdateTag(Tag tag)
			{
				return Client.updateTag(AuthenticationToken(), tag);
			}
Пример #3
0
 private Tag CreateTagIfNeeded(INoteStore note, string name, string parent = null)
 {
     if (AllTags.Any(m => m.Name == name) == false)
     {
         Tag newTag = new Tag { Name = name };
         if (parent != null) newTag.ParentGuid = parent;
         newTag = note.CreateTag(newTag);
         allTags.Add(newTag);
         return newTag;
     }
     return AllTags.First(m => m.Name == name);
 }
			///** Asks the service to make a tag with a set of information.
			// @param  tag The desired list of fields for the tag are specified in this object. The caller must specify the tag name, and may provide the parentGUID.
			// */
			public Tag CreateTag(Tag tag)
			{
				return Client.createTag(AuthenticationToken(), tag);
			}
Пример #5
0
        private String createTag(String sTitle)
        {
            if (isConnexionOK())
            {
                String rTagGuid = getTagGuid(sTitle);
                if (String.IsNullOrEmpty (rTagGuid))
                {
                    Tag tag = new Tag();
                    tag.Name = sTitle;
                    Tag createdTag = noteStore.createTag(authToken, tag);
                    return createdTag.Guid;
                }
                else
                {
                    return rTagGuid;
                }

            } else return null;
        }