Example #1
0
        private void AddInitialPolicyDocuments(IDynamicsClient dynamicsClient)
        {
            string PolicyDocumentInitializationFile = Configuration["PolicyDocumentInitializationFile"];

            if (string.IsNullOrEmpty(PolicyDocumentInitializationFile))
            {
                // default to sample data, which is stored in the "SeedData" directory.
                PolicyDocumentInitializationFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SeedData" + Path.DirectorySeparatorChar + "PolicyDocuments.json");
            }
            bool forceupdate = false;

            if (!string.IsNullOrEmpty(Configuration["FORCE_POLICY_UPDATE"]))
            {
                forceupdate = true;
            }
            dynamicsClient.AddInitialPolicyDocumentsFromFile(PolicyDocumentInitializationFile, forceupdate);
        }