Example #1
0
        public static ServiceReferenceMapFile CreateMapFileWithUrl(string url)
        {
            var mapFile = new ServiceReferenceMapFile();

            mapFile.AddMetadataSourceForUrl(url);
            return(mapFile);
        }
		ServiceReferenceMapFileName CreateServiceReferenceMapFile()
		{
			ServiceReferenceMapFileName mapFileName = project.GetServiceReferenceMapFileName(fileGenerator.Options.ServiceName);
			var mapFile = new ServiceReferenceMapFile(mapFileName);
			fileGenerator.GenerateServiceReferenceMapFile(mapFile);
			return mapFileName;
		}
Example #3
0
        ServiceReferenceMapFileName CreateServiceReferenceMapFile()
        {
            ServiceReferenceMapFileName mapFileName = project.GetServiceReferenceMapFileName(fileGenerator.Options.ServiceName);
            var mapFile = new ServiceReferenceMapFile(mapFileName);

            fileGenerator.GenerateServiceReferenceMapFile(mapFile);
            return(mapFileName);
        }
		string GenerateMapFile(ServiceReferenceMapFile mapFile)
		{
			var output = new StringBuilder();
			var writer = new StringWriter(output);
			
			generator.GenerateServiceReferenceMapFile(writer, mapFile);
			
			return output.ToString();
		}
		void GenerateServiceReferenceProxy(MetadataSet metadata)
		{
			ServiceReferenceFileName referenceFileName = project.GetServiceReferenceFileName(Namespace);
			CreateFolderForFileIfFolderMissing(referenceFileName.Path);
			
			fileGenerator.ServiceReferenceNamespace = Namespace;
			fileGenerator.GenerateProxyFile(metadata, referenceFileName.Path);
			
			ServiceReferenceMapFileName mapFileName = project.GetServiceReferenceMapFileName(Namespace);
			var mapFile = new ServiceReferenceMapFile(mapFileName);
			fileGenerator.GenerateServiceReferenceMapFile(mapFile);
			
			project.AddServiceReferenceProxyFile(referenceFileName);
			project.AddServiceReferenceMapFile(mapFileName);
		}
		void CreateMapFilesToCompare()
		{
			lhs = new ServiceReferenceMapFile();
			rhs = new ServiceReferenceMapFile();
		}
		public void AddServiceReference_GeneratesServiceReference_ReferenceServiceMapFileIsCreated()
		{
			CreateGenerator();
			AddProxyFileNameForServiceName(@"d:\projects\MyProject\Service References", "MyServiceRef");
			AddMapFileNameForServiceName(@"d:\projects\MyProject\Service References", "MyServiceRef");
			generator.Options.ServiceName = "MyServiceRef";
			
			generator.AddServiceReference();
			
			SvcUtilRunCompletedSuccessfully();
			
			var expectedMapFile = new ServiceReferenceMapFile() {
				FileName = @"d:\projects\MyProject\Service References\MyServiceRef\Reference.svcmap"
			};
			
			fakeReferenceMapGenerator.AssertWasCalled(gen => gen.GenerateServiceReferenceMapFile(expectedMapFile));
		}
 public static ServiceReferenceMapFile CreateMapFileWithUrl(string url)
 {
     var mapFile = new ServiceReferenceMapFile();
     mapFile.AddMetadataSourceForUrl(url);
     return mapFile;
 }
		public void GenerateServiceReferenceMapFile(ServiceReferenceMapFile mapFile)
		{
			mapGenerator.GenerateServiceReferenceMapFile(mapFile);
		}
 public void GenerateServiceReferenceMapFile(TextWriter textWriter, ServiceReferenceMapFile mapFile)
 {
     var serializer = new XmlSerializer(typeof(ServiceReferenceMapFile));
     serializer.Serialize(textWriter, mapFile);
 }
 public void GenerateServiceReferenceMapFile(ServiceReferenceMapFile mapFile)
 {
     var writer = new StreamWriter(mapFile.FileName);
     GenerateServiceReferenceMapFile(writer, mapFile);
 }
Example #12
0
        public void GenerateServiceReferenceMapFile(TextWriter textWriter, ServiceReferenceMapFile mapFile)
        {
            var serializer = new XmlSerializer(typeof(ServiceReferenceMapFile));

            serializer.Serialize(textWriter, mapFile);
        }
Example #13
0
        public void GenerateServiceReferenceMapFile(ServiceReferenceMapFile mapFile)
        {
            var writer = new StreamWriter(mapFile.FileName);

            GenerateServiceReferenceMapFile(writer, mapFile);
        }
		public void AddServiceReference_GeneratesServiceReference_ReferenceServiceMapFileIsCreated()
		{
			CreateGenerator();
			AddProxyFileNameForServiceName(@"d:\projects\MyProject\Service References", "MyServiceRef");
			AddMapFileNameForServiceName(@"d:\projects\MyProject\Service References", "MyServiceRef");
			generator.Namespace = "MyServiceRef";
			
			generator.AddServiceReference(metadata);
			
			var expectedMapFile = new ServiceReferenceMapFile() {
				FileName = @"d:\projects\MyProject\Service References\MyServiceRef\Reference.svcmap"
			};
			
			fakeReferenceMapGenerator.AssertWasCalled(gen => gen.GenerateServiceReferenceMapFile(expectedMapFile));
		}
Example #15
0
 public void GenerateServiceReferenceMapFile(ServiceReferenceMapFile mapFile)
 {
     mapGenerator.GenerateServiceReferenceMapFile(mapFile);
 }