Example #1
0
 public override bool Equals(object obj)
 {
     if (base.Equals(obj))
     {
         SharepointItemId sharepointItemId = obj as SharepointItemId;
         return(sharepointItemId.id == this.id);
     }
     return(false);
 }
        public SharepointDocumentLibraryItem Read(ObjectId objectId, params PropertyDefinition[] propsToReturn)
        {
            if (objectId == null)
            {
                throw new ArgumentNullException("objectId");
            }
            SharepointItemId sharepointItemId = objectId as SharepointItemId;
            SharepointListId sharepointListId = base.Id as SharepointListId;

            if (sharepointItemId == null)
            {
                throw new ArgumentException("objectId as SharepointItemId");
            }
            if (sharepointItemId.ListName != sharepointListId.ListName || sharepointItemId.SiteUri != sharepointListId.SiteUri)
            {
                throw new ObjectNotFoundException(objectId, Strings.ExObjectNotFound(objectId.ToString()));
            }
            return(SharepointDocumentLibraryItem.Read(this.Session, objectId));
        }