public BrandEntity(int id, string name, PathDescriptor cdnUrl, params SkinEntity[] skins) { this.Id = id; this.Name = name; this.CDNUrl = cdnUrl; this.Skins = skins; }
private PathDescriptor ReplaceHttpsWithHttp() { if (this.IsEmpty()) { return(this); } if (BasePathComponents[0] != "https:") { return(this); } var result = new PathDescriptor(BasePathComponents.ToArray(), Arguments.ToArray()); result.BasePathComponents[0] = "http:"; return(result); }
public PathDescriptor GetOverrideFileOrNull(PathDescriptor fileRelativePath, SkinCode skinCode) { if (this.Method == ABTestMethod.FullClient) { return(fileRelativePath); } foreach (var fileOverride in this.FilesOverride) { if (fileOverride.GetOriginalFile(skinCode).EndsWith(fileRelativePath)) { return(fileOverride.OverrideFile); } } return(null); }
public bool EndsWith(PathDescriptor path) { if (BasePathComponents.Length < path.BasePathComponents.Length) { return(false); } var k = this.BasePathComponents.Length - 1; for (int i = path.BasePathComponents.Length - 1; i >= 0; i--) { if (0 != string.Compare(path.BasePathComponents[i], this.BasePathComponents[k], true)) { return(false); } k--; } return(true); }
public ABTestCase(string id, bool isDefault, ABTestMethod method, string name, decimal usePercentage, string description, PathDescriptor clientPath) { this.Id = id; this.IsDefault = isDefault; this.Method = method; this.Name = name; this.UsePercentage = usePercentage; this.Description = description; this.ClientPath = clientPath; this.FilesOverride = new ABTestFileOverrideCollection(); }
public ABTestFileOverride(string originalFile, string overrideFile) { _originalFile = new PathDescriptor(originalFile); this.OverrideFile = new PathDescriptor(overrideFile); }
public EnvironmentConnection(string name, PathDescriptor configurationFilePath) { Name = name; ConfigurationFilePath = configurationFilePath; }