MonoDevelop.VersionControl.Repository.Unref C# (CSharp) Méthode

Unref() private méthode

private Unref ( ) : void
Résultat void
		internal void Unref ()
		{
			if (--references == 0)
				Dispose ();
		}

Usage Example

        static void OnExtensionChanged(object s, ExtensionNodeEventArgs args)
        {
            VersionControlSystem vcs;

            try {
                vcs = (VersionControlSystem)args.ExtensionObject;
            } catch (Exception e) {
                LoggingService.LogError("Failed to initialize VersionControlSystem type.", e);
                return;
            }

            if (args.Change == ExtensionChange.Add)
            {
                handlers.Add(vcs);
                try {
                    // Include the repository type in the serialization context, so repositories
                    // of this type can be deserialized from the configuration file.
                    Repository r = vcs.CreateRepositoryInstance();
                    r.AddRef();
                    dataContext.IncludeType(r.GetType());
                    r.Unref();
                } catch (Exception e) {
                    LoggingService.LogError("Error while adding version control system.", e);
                }
            }
            else
            {
                handlers.Remove(vcs);
            }
        }
All Usage Examples Of MonoDevelop.VersionControl.Repository::Unref