mirror of
https://github.com/jeremytammik/RevitSdkSamples.git
synced 2026-08-30 00:23:01 +00:00
integrate Revit 2025 SDK
This commit is contained in:
@@ -41,7 +41,7 @@ namespace SchemaWrapperTools
|
||||
/// and also provides easy serialization of schema data to xml for the user.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class SchemaWrapper
|
||||
public class SchemaWrapper : IDisposable
|
||||
{
|
||||
#region Constructors and class Factories
|
||||
/// <summary>
|
||||
@@ -154,6 +154,28 @@ namespace SchemaWrapperTools
|
||||
|
||||
#endregion
|
||||
|
||||
#region IDisposable implementation
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
if (!disposing || isDisposed)
|
||||
return;
|
||||
|
||||
(m_Schema as IDisposable)?.Dispose();
|
||||
(m_SchemaBuilder as IDisposable)?.Dispose();
|
||||
|
||||
isDisposed = true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Active schema manipulation
|
||||
|
||||
/// <summary>
|
||||
@@ -526,6 +548,9 @@ namespace SchemaWrapperTools
|
||||
|
||||
[NonSerialized]
|
||||
private string m_xmlPath;
|
||||
|
||||
[NonSerialized]
|
||||
private bool isDisposed;
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user