Exemplo n.º 1
0
 private static GetterDelegate AsfSettingsGetterDelegate(int slot, ProviderPropertyDefinition propertyDefinition)
 {
     return(delegate(IPropertyBag bag)
     {
         if (bag[propertyDefinition] == null)
         {
             bag[propertyDefinition] = HostedSpamFilterConfigSchema.GetDefaultAsfOptionValues();
         }
         int num = (slot % 2 == 0) ? 0 : 4;
         return (SpamFilteringOption)((bag[propertyDefinition] as byte[])[slot / 2] >> num & 15);
     });
 }
Exemplo n.º 2
0
 private static SetterDelegate AsfSettingsSetterDelegate(int slot, ProviderPropertyDefinition propertyDefinition)
 {
     return(delegate(object value, IPropertyBag bag)
     {
         if (bag[propertyDefinition] == null)
         {
             bag[propertyDefinition] = HostedSpamFilterConfigSchema.GetDefaultAsfOptionValues();
         }
         byte[] array = bag[propertyDefinition] as byte[];
         int num = (slot % 2 == 0) ? 0 : 4;
         int num2 = (num == 0) ? 240 : 15;
         int num3 = (int)array[slot / 2];
         num3 &= num2;
         num3 |= (int)value << num;
         array[slot / 2] = (byte)num3;
         (bag as PropertyBag).MarkAsChanged(propertyDefinition);
     });
 }