/// <summary> /// Gets a tag prefix, also returning the directive that would have to be added if necessary. /// </summary> public string GetTagPrefixWithNewDirective(INamedTypeSymbol control, string assemblyName, string desiredPrefix, out WebFormsPageInfo.RegisterDirective directiveNeededToAdd) { directiveNeededToAdd = null; string existingPrefix = GetTagPrefix(control); if (existingPrefix != null) { return(existingPrefix); } //TODO: detect control name conflicts string prefix = desiredPrefix; if (desiredPrefix == null) { prefix = GetPrefix(control); } var an = SystemAssemblyService.ParseAssemblyName(assemblyName); directiveNeededToAdd = new WebFormsPageInfo.AssemblyRegisterDirective(prefix, control.ContainingNamespace.GetFullName(), an.Name); return(prefix); }
/// <summary> /// Gets a tag prefix, also returning the directive that would have to be added if necessary. /// </summary> public string GetTagPrefixWithNewDirective (IType control, string assemblyName, string desiredPrefix, out WebFormsPageInfo.RegisterDirective directiveNeededToAdd) { directiveNeededToAdd = null; string existingPrefix = GetTagPrefix (control); if (existingPrefix != null) return existingPrefix; //TODO: detect control name conflicts string prefix = desiredPrefix; if (desiredPrefix == null) prefix = GetPrefix (control); var an = SystemAssemblyService.ParseAssemblyName (assemblyName); directiveNeededToAdd = new WebFormsPageInfo.AssemblyRegisterDirective (prefix, control.Namespace, an.Name); return prefix; }