Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
 private static MockProjectElementLinkRemoter Export <RMock>(ProjectCollectionLinker exporter, ProjectElement xml)
     where RMock : MockProjectElementLinkRemoter, new()
 {
     return(exporter.Export <ProjectElement, RMock>(xml));
 }