public void SetUp()
 {
     EnvironmentHelper.AssertOracleClientIsInstalled();
     configurationSource = OracleTestConfigurationSource.CreateConfigurationSource();
 }
示例#2
0
 public Database Assemble(string name, System.Configuration.ConnectionStringSettings connectionStringSettings, Microsoft.Practices.EnterpriseLibrary.Common.Configuration.IConfigurationSource configurationSource)
 {
     throw new NotImplementedException();
 }
示例#3
0
        public IPageTemplateProvider Assemble(Microsoft.Practices.ObjectBuilder.IBuilderContext context, PageTemplateProviderData objectConfiguration, Microsoft.Practices.EnterpriseLibrary.Common.Configuration.IConfigurationSource configurationSource, ConfigurationReflectionCache reflectionCache)
        {
            var data = objectConfiguration as MasterPagePageTemplateProviderData;

            if (data == null)
            {
                throw new ArgumentException("Expected configuration to be of type " + typeof(MasterPagePageTemplateProviderAssembler).Name,
                                            "objectConfiguration");
            }

            Type addNewTemplateWorkflow = null;

            if (!string.IsNullOrEmpty(data.AddNewTemplateWorkflow))
            {
                try
                {
                    addNewTemplateWorkflow = TypeManager.GetType(data.AddNewTemplateWorkflow);
                }
                catch (Exception ex)
                {
                    Log.LogError(this.GetType().FullName, ex);
                }
            }

            string folderPath = PathUtil.Resolve(data.Directory);

            if (!C1Directory.Exists(folderPath))
            {
                throw new ConfigurationErrorsException("Folder '{0}' does not exists".FormatWith(folderPath),
                                                       objectConfiguration.ElementInformation.Source, objectConfiguration.ElementInformation.LineNumber);
            }

            return(new MasterPagePageTemplateProvider(data.Name, data.Directory, data.AddNewTemplateLabel, addNewTemplateWorkflow));
        }
示例#4
0
        public IPageTemplateProvider Assemble(Microsoft.Practices.ObjectBuilder.IBuilderContext context, PageTemplateProviderData objectConfiguration, Microsoft.Practices.EnterpriseLibrary.Common.Configuration.IConfigurationSource configurationSource, ConfigurationReflectionCache reflectionCache)
        {
            var data = objectConfiguration as XmlPageTemplateProviderData;

            if (data == null)
            {
                throw new ArgumentException("Expected configuration to be of type " + typeof(XmlPageTemplateProviderData).Name,
                                            "objectConfiguration");
            }

            Type addNewTemplateWorkflow = null;

            if (!string.IsNullOrEmpty(data.AddNewTemplateWorkflow))
            {
                try
                {
                    addNewTemplateWorkflow = TypeManager.GetType(data.AddNewTemplateWorkflow);
                }
                catch (Exception ex)
                {
                    Log.LogError(this.GetType().FullName, ex);
                }
            }

            return(new XmlPageTemplateProvider(data.Name, data.AddNewTemplateLabel, addNewTemplateWorkflow));
        }