public RemotedResolvedImport(ResolvedImport resolvedImport, ProjectCollectionLinker exporter) { this.ImportingElement = exporter.Export <ProjectElement, MockProjectImportElementLinkRemoter>(resolvedImport.ImportingElement); this.ImportedProject = exporter.Export <ProjectElement, MockProjectRootElementLinkRemoter>(resolvedImport.ImportedProject); this.IsImported = resolvedImport.IsImported; this.SdkResult = resolvedImport.SdkResult; }
public static IList <RMock> ExportCollection <T, RMock>(this ProjectCollectionLinker exporter, IEnumerable <T> source) where T : class where RMock : MockLinkRemoter <T>, new() { if (source == null) { return(null); } // Just copy ... List <RMock> result = new List <RMock>(); foreach (var s in source) { var sRemoter = exporter.Export <T, RMock>(s); result.Add(sRemoter); } return(result); }
public static IDictionary <key, RMock> ExportDictionary <key, T, RMock>(this ProjectCollectionLinker exporter, IDictionary <key, T> source) where T : class where RMock : MockLinkRemoter <T>, new() { if (source == null) { return(null); } // Just copy ... Dictionary <key, RMock> result = new Dictionary <key, RMock>(); foreach (var s in source) { var valueRemoter = exporter.Export <T, RMock>(s.Value); result.Add(s.Key, valueRemoter); } return(result); }
private static MockProjectElementLinkRemoter Export <RMock>(ProjectCollectionLinker exporter, ProjectElement xml) where RMock : MockProjectElementLinkRemoter, new() { return(exporter.Export <ProjectElement, RMock>(xml)); }