private static void AppendSettingsString(StringBuilder sb, string name, LegacyThrottlingPolicySettings settings)
 {
     if (settings != null && !string.IsNullOrEmpty(settings.ToString()))
     {
         if (sb.Length > 0)
         {
             sb.Append(", ");
         }
         sb.Append("Legacy/" + name + ":" + settings.ToString());
     }
 }
Exemple #2
0
 private static ADPropertyDefinition BuildCalculatedReadOnlySettingProperty(string name, string key, ADPropertyDefinition parentProperty)
 {
     return(new ADPropertyDefinition(name, ExchangeObjectVersion.Exchange2010, typeof(string), null, ADPropertyDefinitionFlags.ReadOnly | ADPropertyDefinitionFlags.Calculated, null, PropertyDefinitionConstraint.None, PropertyDefinitionConstraint.None, new ProviderPropertyDefinition[]
     {
         parentProperty
     }, null, delegate(IPropertyBag propertyBag)
     {
         LegacyThrottlingPolicySettings legacyThrottlingPolicySettings = (LegacyThrottlingPolicySettings)propertyBag[parentProperty];
         string result;
         if (legacyThrottlingPolicySettings != null && legacyThrottlingPolicySettings.TryGetValue(key, out result))
         {
             return result;
         }
         return null;
     }, null, null, null));
 }