コード例 #1
0
		public void TestConvertPolicySetNullPolicySet()
		{
			LocalPolicyCache localPolicyCache = new LocalPolicyCache(m_testPath, false);
			IPolicySetCache policySetCache = localPolicyCache.NewPolicySet("Test policy set");
			PolicyConverterFactory policySetConverter = new PolicyConverterFactory(policySetCache);
			policySetConverter.ConvertPolicySet(AddConversionMessage);
		}
コード例 #2
0
		public void TestGetPolicySetVersionNullPolicySet()
		{
			LocalPolicyCache localPolicyCache = new LocalPolicyCache(m_testPath, false);
			IPolicySetCache policySetCache = localPolicyCache.NewPolicySet("Test policy set");
			PolicyConverterFactory policySetConverter = new PolicyConverterFactory(policySetCache);
			policySetConverter.GetPolicySetVersion();
		}
コード例 #3
0
 public void SetPolicy(string sPolicyFilePath, string sPolicyFileName)
 {
     m_sRememberPolicyName = sPolicyFileName;
     bool bRuntime = sPolicyFileName.EndsWith(".runtimepolicy", true, System.Globalization.CultureInfo.InvariantCulture);
     m_localCache = new LocalPolicyCache(sPolicyFilePath, bRuntime);
     m_localCache.NewPolicySet(sPolicyFileName);
     m_engine.PolicyCache = m_localCache;
 }
コード例 #4
0
 public static IUroPolicyEngine CreateUroPolicyEngineWithPolicyCache(string policyDirectory)
 {
     UroPolicyEngine engine = new Workshare.Policy.Engine.UroPolicyEngine();
     LocalPolicyCache policyCache = new LocalPolicyCache(policyDirectory, true);
     policyCache.NewPolicySet(policyDirectory);
     engine.PolicyCache = policyCache;
     return engine;    
 }