public static string AddRefFile(string ramlSourceFile, string destFolderPath, string targetFileName, RamlProperties properties) { var refFileName = Path.GetFileNameWithoutExtension(targetFileName) + ".ref"; var refFilePath = Path.Combine(destFolderPath, refFileName); var content = RamlPropertiesManager.BuildContent(properties); if (File.Exists(refFilePath)) { new FileInfo(refFilePath).IsReadOnly = false; } File.WriteAllText(refFilePath, content); new FileInfo(refFilePath).IsReadOnly = true; return(refFilePath); }
public static string AddRefFile(string ramlSourceFile, string targetNamespace, string ramlOriginalSource, string destFolderPath, string targetFileName, bool?useAsyncMethods = null, string clientRootClassName = null) { var refFileName = Path.GetFileNameWithoutExtension(targetFileName) + ".ref"; var refFilePath = Path.Combine(destFolderPath, refFileName); var content = RamlPropertiesManager.BuildContent(targetNamespace, ramlOriginalSource, useAsyncMethods, clientRootClassName); if (File.Exists(refFilePath)) { new FileInfo(refFilePath).IsReadOnly = false; } File.WriteAllText(refFilePath, content); new FileInfo(refFilePath).IsReadOnly = true; return(refFilePath); }