private String ExtractNamespace( String name ) { int index = name.LastIndexOf('.'); return index == -1 ? name : name.Substring(0, index); }