aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-05-13 13:58:45 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-05-13 13:58:45 +0300
commit4cc4089f36b0a9b9d754e33acb49da930f846699 (patch)
tree314c77ca012d10ff1440a112893072943e479066 /Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs
parent8d58d0b03648069600f8abf39dbe68b16c90559b (diff)
downloadTango-4cc4089f36b0a9b9d754e33acb49da930f846699.tar.gz
Tango-4cc4089f36b0a9b9d754e33acb49da930f846699.zip
Some fixed to TCC mobile design.
Implemented DFU reset on Machine Operator.
Diffstat (limited to 'Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs')
-rw-r--r--Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs b/Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs
index de882c910..be5f5439f 100644
--- a/Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs
+++ b/Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs
@@ -26,6 +26,11 @@ namespace Tango.BL
private DataSource _dataSource;
/// <summary>
+ /// Gets a value indicating whether this instance is disposed.
+ /// </summary>
+ public bool IsDisposed { get; private set; }
+
+ /// <summary>
/// Initializes a new instance of the <see cref="ObservablesContext"/> class.
/// </summary>
public ObservablesContext()
@@ -248,5 +253,18 @@ namespace Tango.BL
EntityFrameworkCache.Initialize(cache);
}
}
+
+ /// <summary>
+ /// Disposes the context. The underlying <see cref="T:System.Data.Entity.Core.Objects.ObjectContext" /> is also disposed if it was created
+ /// is by this context or ownership was passed to this context when this context was created.
+ /// The connection to the database (<see cref="T:System.Data.Common.DbConnection" /> object) is also disposed if it was created
+ /// is by this context or ownership was passed to this context when this context was created.
+ /// </summary>
+ /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
+ protected override void Dispose(bool disposing)
+ {
+ base.Dispose(disposing);
+ IsDisposed = true;
+ }
}
}