public DeployerConfigBase CreateFromElement(DeployerConfigElementBase element) { if (element.IsAvailable()) { var tde = (TestDeployerConfigElement)element; return(new TestDeployerConfig { TestProperty = tde.TestProperty }); } else { return(null); } }
internal static DeployerConfigBase CreateDeployerConfigFromElement(DeployerConfigElementBase element, string configFactoryType) { if (element.IsAvailable()) { configFactoryType.ThrowIfNullOrEmpty <InvalidOperationException>("ConfigFactoryType is null or empty"); Type type = Type.GetType(configFactoryType, true); var factory = (IDeployerConfigFactory)Activator.CreateInstance(type); return(factory.CreateFromElement(element)); } else { return(null); } }
public DeployerConfigBase CreateFromElement(DeployerConfigElementBase deployerElement) { if (deployerElement.IsAvailable()) { var el = (SSDTProjectDeployerConfigElement)deployerElement; el.BuildConfiguration.ThrowIfNullOrEmpty <InvalidOperationException>("BuildConfiguration is null or empty"); el.DatabaseProjectFileName.ThrowIfNullOrEmpty <InvalidOperationException>("DatabaseProjectFileName is null or empty"); return(new SSDTProjectDeployerConfig { BuildConfiguration = el.BuildConfiguration, DatabaseProjectFileName = el.DatabaseProjectFileName }); } else { return(null); } }