System.Runtime.Versioning.MultitargetingHelpers.GetAssemblyQualifiedName C# (CSharp) Method

GetAssemblyQualifiedName() static private method

static private GetAssemblyQualifiedName ( Type type, string>.Func converter ) : string
type System.Type
converter string>.Func
return string
        internal static string GetAssemblyQualifiedName(Type type, Func<Type, string> converter)
        {
            string assemblyFullName = null;
 
            if (type != null)
            {
                if (converter != null)
                {
                    try
                    {
                        assemblyFullName = converter(type);
                        // TODO: validate that type and assembly names are well constructed - throw if not.
                    }
                    catch (Exception e)
                    {
                        if (IsSecurityOrCriticalException(e))
                        {
                            throw;
                        }
                    }
                }
 
                if (assemblyFullName == null)
                {
                    assemblyFullName = type.AssemblyQualifiedName;
                }
            }
 
            return assemblyFullName;
        }