public ProvisioningTemplate GetProvisioningTemplate(string name) { try { ReflectionManager _reflectionHelper = new ReflectionManager(); var _provider = _reflectionHelper.GetTemplateProvider(ModuleKeys.PROVISIONINGPROVIDER_KEY); var _pt = _provider.GetTemplate(name); return _pt; } catch(Exception _ex) { var _message = string.Format(PCResources.TemplateProviderBase_Exception_Message, _ex.Message); Log.Error("Provisioning.Common.Data.Templates.Impl.XMLSiteTemplateManager", PCResources.TemplateProviderBase_Exception_Message, _ex); throw new DataStoreException(_message, _ex); } }
public ProvisioningTemplate GetProvisioningTemplate(string name) { Log.Info("Retrieving SP stored template: ", name); try { ReflectionManager _reflectionHelper = new ReflectionManager(); var _provider = _reflectionHelper.GetTemplateProvider(ModuleKeys.PROVISIONINGPROVIDER_KEY); if (_provider.Connector.GetType() == typeof(SharePointConnector)) { _provider.Connector.AddParameter(SharePointConnector.CLIENTCONTEXT, Authentication.GetAuthenticatedContext()); } var _pt = _provider.GetTemplate(name); return _pt; } catch (Exception _ex) { var _message = string.Format(PCResources.TemplateProviderBase_Exception_Message, _ex.Message); Log.Error("Provisioning.Common.Data.Templates.Impl.SPSiteTemplateManager", PCResources.TemplateProviderBase_Exception_Message, _ex); throw new DataStoreException(_message, _ex); } }