public static CompositionError PreventedByExistingImport(ComposablePart part, ImportDefinition import) { return CompositionError.Create( CompositionErrorId.ImportEngine_PreventedByExistingImport, Strings.ImportEngine_PreventedByExistingImport, import.ToElement().DisplayName, part.ToElement().DisplayName); }
public static CompositionError CreateImportCardinalityMismatch(ImportCardinalityMismatchException exception, ImportDefinition definition) { Assumes.NotNull(exception, definition); return CompositionError.Create( CompositionErrorId.ImportEngine_ImportCardinalityMismatch, exception.Message, definition.ToElement(), (Exception)null); }
public static CompositionError CreatePartCannotSetImport(ComposablePart part, ImportDefinition definition, Exception innerException) { Assumes.NotNull(part, definition, innerException); ICompositionElement element = definition.ToElement(); return CompositionError.Create( CompositionErrorId.ImportEngine_PartCannotSetImport, element, innerException, Strings.ImportEngine_PartCannotSetImport, element.DisplayName, part.ToElement().DisplayName); }