internal void Detach(bool keepProperties) { try { if (keepProperties) { GC.KeepAlive(Name); GC.KeepAlive(Uri); GC.KeepAlive(RepositoryUri); GC.KeepAlive(RepositoryId); GC.KeepAlive(CopiedFrom); GC.KeepAlive(ConflictOldFile); GC.KeepAlive(ConflictNewFile); GC.KeepAlive(ConflictWorkFile); GC.KeepAlive(PropertyRejectFile); GC.KeepAlive(Checksum); GC.KeepAlive(LastChangeAuthor); GC.KeepAlive(LockToken); GC.KeepAlive(LockOwner); GC.KeepAlive(LockComment); GC.KeepAlive(ChangeList); GC.KeepAlive(FileExternalPath); GC.KeepAlive(FileExternalRevision); GC.KeepAlive(FileExternalOperationalRevision); } } finally { _client = null; _status = null; _entry = null; _pool = null; } }
internal SvnStatusEventArgs(sbyte *path, svn_client_status_t status, SvnClientContext client, AprPool pool) { if (path == null) { throw new ArgumentNullException(nameof(path)); } if (status == null) { throw new ArgumentNullException(nameof(status)); } if (pool == null) { throw new ArgumentNullException(nameof(pool)); } _pPath = path; _status = status; _pool = pool; _client = client; Versioned = status.versioned; Conflicted = status.conflicted; NodeKind = (SvnNodeKind)status.kind; FileLength = (status.filesize >= 0) ? status.filesize : -1; LocalNodeStatus = (SvnStatus)status.node_status; LocalTextStatus = (SvnStatus)status.text_status; LocalPropertyStatus = (SvnStatus)status.prop_status; Wedged = status.wc_is_locked; LocalCopied = status.copied; Revision = status.revision; LastChangeRevision = status.changed_rev; LastChangeTime = SvnBase.DateTimeFromAprTime(status.changed_date); Switched = status.switched; IsFileExternal = status.file_external; Depth = (SvnDepth)status.depth; RemoteNodeStatus = (SvnStatus)status.repos_node_status; RemoteTextStatus = (SvnStatus)status.repos_text_status; RemotePropertyStatus = (SvnStatus)status.repos_prop_status; RemoteUpdateRevision = status.ood_changed_rev; if (status.ood_changed_rev != -1) { RemoteUpdateCommitTime = SvnBase.DateTimeFromAprTime(status.ood_changed_date); RemoteUpdateNodeKind = (SvnNodeKind)status.ood_kind; } }
protected internal override void Detach(bool keepProperties) { try { if (keepProperties) { // Use all properties to get them cached in .Net memory GC.KeepAlive(FullPath); GC.KeepAlive(Path); GC.KeepAlive(LastChangeAuthor); GC.KeepAlive(RepositoryRoot); GC.KeepAlive(RepositoryIdValue); GC.KeepAlive(Uri); GC.KeepAlive(LocalLock); GC.KeepAlive(ChangeList); GC.KeepAlive(RemoteLock); GC.KeepAlive(RemoteUpdateCommitAuthor); GC.KeepAlive(WorkingCopyInfo); GC.KeepAlive(MovedFrom); GC.KeepAlive(MovedTo); } if (_localLock != null) { _localLock.Detach(keepProperties); } if (_reposLock != null) { _reposLock.Detach(keepProperties); } if (_wcInfo != null) { _wcInfo.Detach(keepProperties); } } finally { _pPath = null; _status = null; _pool = null; _client = null; base.Detach(keepProperties); } }
internal SvnWorkingCopyInfo(svn_client_status_t status, SvnClientContext client, AprPool pool) { if (status == null) { throw new ArgumentNullException(nameof(status)); } else if (client == null) { throw new ArgumentNullException(nameof(client)); } else if (pool == null) { throw new ArgumentNullException(nameof(pool)); } _client = client; _status = status; _pool = pool; }