CmisSync.Lib.Storage.Database.Entities.MappedObject.MappedObject C# (CSharp) Method

MappedObject() public method

Initializes a new instance of the MappedObject class.
public MappedObject ( string name, string remoteId, MappedObjectType type, string parentId, string changeToken, long contentSize = -1, bool readOnly = false ) : System
name string Name of the Directory/Folder.
remoteId string Remote identifier.
type MappedObjectType Object type.
parentId string Parent identifier.
changeToken string Change token.
contentSize long Size of the content. Only exists on Documents.
readOnly bool Readonly flag of the mapped object.
return System
        public MappedObject(string name, string remoteId, MappedObjectType type, string parentId, string changeToken, long contentSize = -1, bool readOnly = false) {
            if (string.IsNullOrEmpty(name)) {
                throw new ArgumentNullException("name", "Given name is null or empty");
            }

            if (string.IsNullOrEmpty(remoteId)) {
                throw new ArgumentNullException("remoteId");
            }

            if (type == MappedObjectType.Unkown) {
                throw new ArgumentException("Given type is unknown but must be set to a known type", "type");
            } else {
                this.Type = type;
            }

            this.Name = name;
            this.RemoteObjectId = remoteId;
            this.ParentId = parentId;
            this.LastChangeToken = changeToken;
            this.LastContentSize = contentSize;
            this.ActualOperation = OperationType.No;
            this.Retries = new Dictionary<OperationType, int>();
            this.IsReadOnly = readOnly;
        }

Same methods

MappedObject::MappedObject ( ) : System
MappedObject::MappedObject ( IFolder remoteFolder ) : System
MappedObject::MappedObject ( MappedObject data ) : System