コード例 #1
0
        public static void Go()
        {
            OrgHierarchyCreator creator = new OrgHierarchyCreator();
            var parent = creator.GetEnterpriseOrgUnit();

            creator.CreateBrandsAndDivisions(parent);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: dddokada/WFMRWebAPI
 public static void Main(string[] args)
 {
     try
     {
         OrgHierarchyCreator.Go();
     }
     catch (AggregateException aggregateException)
     {
         var innerException = aggregateException.InnerException;
         if (innerException is ApiException)
         {
             var apiException = innerException as ApiException;
             var responseBody = apiException.Response.Content.ReadAsStringAsync().Result;
             Console.Error.WriteLine(responseBody);
         }
         else
         {
             Console.Error.WriteLine(aggregateException);
         }
     }
     catch (Exception e)
     {
         Console.Error.WriteLine(e);
     }
     finally
     {
         Console.WriteLine("Finished! Press Enter");
         Console.ReadLine();
     }
 }