コード例 #1
0
            /// <summary>
            /// Releases all resource used by the <see cref="IEC61850.Client.ReportControlBlock"/> object.
            /// </summary>
            /// <remarks>Call <see cref="Dispose"/> when you are finished using the <see cref="IEC61850.Client.ReportControlBlock"/>. The
            /// <see cref="Dispose"/> method leaves the <see cref="IEC61850.Client.ReportControlBlock"/> in an unusable state.
            /// After calling <see cref="Dispose"/>, you must release all references to the
            /// <see cref="IEC61850.Client.ReportControlBlock"/> so the garbage collector can reclaim the memory that the
            /// <see cref="IEC61850.Client.ReportControlBlock"/> was occupying.</remarks>
            public void Dispose()
            {
                lock (this) {
                    if (self != IntPtr.Zero)
                    {
                        iedConnection.UninstallReportHandler(objectReference);

                        iedConnection.RemoveRCB(this);

                        ClientReportControlBlock_destroy(self);

                        self = IntPtr.Zero;
                    }
                }
            }
コード例 #2
0
            /// <summary>
            /// Releases all resource used by the <see cref="IEC61850.Client.ReportControlBlock"/> object.
            /// </summary>
            /// <remarks>Call <see cref="Dispose"/> when you are finished using the <see cref="IEC61850.Client.ReportControlBlock"/>. The
            /// <see cref="Dispose"/> method leaves the <see cref="IEC61850.Client.ReportControlBlock"/> in an unusable state.
            /// After calling <see cref="Dispose"/>, you must release all references to the
            /// <see cref="IEC61850.Client.ReportControlBlock"/> so the garbage collector can reclaim the memory that the
            /// <see cref="IEC61850.Client.ReportControlBlock"/> was occupying.</remarks>
            public void Dispose()
            {
                DisposeInternal();

                iedConnection.RemoveRCB(this);
            }