internal new static ExportableClassificationRuleCollectionPresentationObject Create(TransportRule transportRule) { if (transportRule == null) { throw new ArgumentNullException("transportRule"); } ExportableClassificationRuleCollectionPresentationObject exportableClassificationRuleCollectionPresentationObject = new ExportableClassificationRuleCollectionPresentationObject(transportRule); exportableClassificationRuleCollectionPresentationObject.Initialize(); return(exportableClassificationRuleCollectionPresentationObject); }
protected override void WriteResult(IConfigurable dataObject) { TaskLogger.LogEnter(); TransportRule transportRule = (TransportRule)dataObject; ClassificationRuleCollectionPresentationObject dataObject2; try { dataObject2 = ExportableClassificationRuleCollectionPresentationObject.Create(transportRule); } catch (InvalidOperationException) { ClassificationDefinitionsDiagnosticsReporter.Instance.WriteInvalidObjectInformation(this.GetHashCode(), transportRule.OrganizationId, transportRule.DistinguishedName); TaskLogger.LogExit(); return; } catch (ArgumentException underlyingException) { ClassificationDefinitionsDiagnosticsReporter.Instance.WriteCorruptRulePackageDiagnosticsInformation(this.GetHashCode(), transportRule.OrganizationId, transportRule.DistinguishedName, underlyingException); TaskLogger.LogExit(); return; } catch (AggregateException ex) { ClassificationDefinitionsDiagnosticsReporter.Instance.WriteCorruptRulePackageDiagnosticsInformation(this.GetHashCode(), transportRule.OrganizationId, transportRule.DistinguishedName, ex.Flatten()); TaskLogger.LogExit(); return; } catch (XmlException ex2) { ClassificationDefinitionsDiagnosticsReporter.Instance.WriteCorruptRulePackageDiagnosticsInformation(this.GetHashCode(), transportRule.OrganizationId, transportRule.DistinguishedName, new AggregateException(new Exception[] { ex2 }).Flatten()); TaskLogger.LogExit(); return; } base.WriteResult(dataObject2); TaskLogger.LogExit(); }