public static string ToConfigText(ILayer self) { var sb = new StringBuilder(); var writer = new StringWriter(sb); TileCacheConfigHelper.ToConfigText(writer, self); return(sb.ToString()); }
public static void LoadConfigText(ILayer self, string config) { if (self == null) { throw new ArgumentNullException("self"); } if (string.IsNullOrEmpty(config)) { throw new ArgumentOutOfRangeException("config"); } var cs = GetConfigSection(new StringReader(config)); if (cs == null) { return; } self.Name = cs.Name; TileCacheConfigHelper.ConfigureLayer(self, cs.Properties); }