Пример #1
0
        private static string GetRepositoryAddress(AssemblyDefinition callingAssembly, AssemblyNameReference reference)
        {
            var builder = new StringBuilder();

            builder.AppendFormat("/{0}/", callingAssembly.MainModule.Architecture.ToString());
            if (reference.HasSilverlightToken() || callingAssembly.IsSilverlight())
            {
                builder.Append("Silverlight");
            }
            else
            {
                builder.Append(callingAssembly.MainModule.Runtime.ToString());
            }
            builder.AppendFormat("/assembly?name={0}", reference.Name);
            builder.AppendFormat("&version={0}", reference.Version.ToString());
            builder.AppendFormat("&token={0}", reference.GetPublicTokenKeyString());
            builder.Append("&specificversion=false");

            return(builder.ToString());
        }