/// <summary> /// Производит удаление всех коллекций прогноза /// </summary> public void Dispose() { // Создаем все коллекции ForecastDatas.Clear(); ForecastDatas = null; BaseComponents.Clear(); BaseComponents = null; BaseComponentDirectives.Clear(); BaseComponentDirectives = null; Components.Clear(); Components = null; ComponentDirectives.Clear(); ComponentDirectives = null; AdStatus.Clear(); AdStatus = null; Damages.Clear(); Damages = null; DefferedItems.Clear(); DefferedItems = null; EngineeringOrders.Clear(); EngineeringOrders = null; OutOfPhaseItems.Clear(); OutOfPhaseItems = null; ServiceBulletins.Clear(); ServiceBulletins = null; MaintenanceChecks.Clear(); MaintenanceChecks = null; Kits.Clear(); Kits = null; DirectiveCollections.Clear(); DirectiveCollections = null; }
/// <summary> /// Создает воздушное судно без дополнительной информации /// </summary> public ComponentDirective(ComponentDirective toCopy) : this() { if (toCopy == null) { return; } Cost = toCopy.Cost; ComponentId = toCopy.ComponentId; DirectiveTypeId = toCopy.DirectiveTypeId; FaaFormFileId = toCopy.FaaFormFileId; HiddenRemarks = toCopy.HiddenRemarks; Highlight = toCopy.Highlight; IsClosed = toCopy.IsClosed; KitRequired = toCopy.KitRequired; ManHours = toCopy.ManHours; MPDTaskType = toCopy.MPDTaskType; ParentComponent = toCopy.ParentComponent; Remarks = toCopy.Remarks; _threshold = toCopy.Threshold; FaaFormFile = toCopy.FaaFormFile; if (_performanceRecords == null) { _performanceRecords = new BaseRecordCollection <DirectiveRecord>(); } _performanceRecords.Clear(); foreach (DirectiveRecord directiveRecord in toCopy.PerformanceRecords) { _performanceRecords.Add(new DirectiveRecord(directiveRecord) { Parent = this, ParentId = ItemId }); } if (Kits == null) { Kits = new CommonCollection <AccessoryRequired>(); } Kits.Clear(); foreach (AccessoryRequired kit in toCopy.Kits) { Kits.Add(new AccessoryRequired(kit) { ParentObject = this, ParentId = ItemId }); } }