Exemplo n.º 1
0
 private void CheckOutMainItems(string[] listOfEntityInfoPaths)
 {
     EntityHelper.envInfo = envInfo;
     foreach (var enPath in listOfEntityInfoPaths)
     {
         var allItems = EntityHelper.GetEntityFilesListByENFilePath(enPath);
         TFSHelper.CheckOutFile(envInfo.dte, allItems[EntityFileTypeEnum.EntityInfoEN].FullPath);
         TFSHelper.CheckOutFile(envInfo.dte, allItems[EntityFileTypeEnum.EntityObjT].FullPath);
         TFSHelper.CheckOutFile(envInfo.dte, allItems[EntityFileTypeEnum.EntityObjV].FullPath);
         TFSHelper.CheckOutFile(envInfo.dte, allItems[EntityFileTypeEnum.EntityObjTXml].FullPath);
         TFSHelper.CheckOutFile(envInfo.dte, allItems[EntityFileTypeEnum.EntityObjVXml].FullPath);
     }
 }
Exemplo n.º 2
0
        public static void Serialize <T>(object obj, ICollection <Type> types, FileInfo fileInfo, IServiceProvider serviceProvider)
        {
            Guard.ArgumentNotNull(obj, "obj");
            Guard.ArgumentNotNull(types, "types");
            Guard.ArgumentNotNull(fileInfo, "fileInfo");

            string text = Serialize <T>(obj, types);

            if (serviceProvider != null)
            {
                TFSHelper.CheckOutFile(serviceProvider, fileInfo.FullName);
                File.WriteAllText(fileInfo.FullName, text);
            }
            else
            {
                File.WriteAllText(fileInfo.FullName, text);
            }
        }