Beispiel #1
0
 public ExtensionSettings(IOrganizationService OrgService, IXrmCache cache, IEncryption encryption, IExtensionSettingsConfig config)
 {
     try
     {
         if (OrgService == null)
         {
             throw new ArgumentNullException("OrgService is required.");
         }
         if (cache == null)
         {
             throw new ArgumentNullException("cache is required.");
         }
         if (config == null)
         {
             throw new ArgumentNullException("config is required.");
         }
         if (encryption == null)
         {
             throw new ArgumentNullException("encryption is required.");
         }
         this.config     = config;
         this.orgService = OrgService;
         this.cache      = cache;
         this.encryption = encryption;
         encryptionKey   = !string.IsNullOrEmpty(config.EncryptionKey) ? config.EncryptionKey : DEFAULT_ENCRYPTION_KEY;
     }
     catch (Exception ex)
     {
         throw new Exception(string.Format("Error constructing ExtensionSettings: {0}", ex.Message), ex);
     }
 }
 protected virtual void Dispose(bool dispossing)
 {
     if (dispossing)
     {
         this.Container = null;
         this.elevatedOrganizationService = null;
         this.ExecutionContext            = null;
         this.extensionSettings           = null;
         this.organizationCache           = null;
         this.organizationService         = null;
         this.organizationServiceFactory  = null;
         this.pluginCache               = null;
         this.tracingService            = null;
         this.xmlConfigurationResources = null;
         this._webRequestFactory        = null;
     }
 }
 public CachedEntities(IOrganizationService OrgService, IXrmCache cache)
 {
     this.OrganizationService = OrgService;
     this.Cache = cache;
 }
 internal XmlConfigurationResource(IOrganizationService orgService, IXrmCache cache)
 {
     this.orgService = orgService;
     this.cache      = cache;
 }
 public SystemUser(IOrganizationService orgService, IXrmCache cache)
 {
     this.OrganizationService = orgService;
     this.Cache = cache;
 }
 public IXmlConfigurationResource BuildConfigurationResources(IOrganizationService orgService, IXrmCache cache)
 {
     return(new XmlConfigurationResource(orgService, cache));
 }
 public IExtensionSettings BuildExtensionSettings(IOrganizationService orgService, IXrmCache cache, IEncryption encryption, IExtensionSettingsConfig config)
 {
     return(new ExtensionSettings(orgService, cache, encryption, config));
 }