Esempio n. 1
0
 protected virtual bool IsLinked(AssemblyDefinition assembly)
 {
     // LinkAll
     if (!link_sdk_only)
     {
         return(true);
     }
     // Link SDK : applies to BCL/SDK and product assembly (e.g. monotouch.dll)
     if (Profile.IsSdkAssembly(assembly))
     {
         return(true);
     }
     if (Profile.IsProductAssembly(assembly))
     {
         return(true);
     }
     // the assembly can be marked with [LinkAssembly]
     if (assembly.HasCustomAttributes)
     {
         foreach (var ca in assembly.CustomAttributes)
         {
             if (IsLinkerSafeAttribute(ca))
             {
                 return(true);
             }
         }
     }
     return(false);
 }
Esempio n. 2
0
        protected override void ProcessAssembly(AssemblyDefinition assembly)
        {
            if (IsSkipped(assembly))
            {
                ProcessUserAssembly(assembly);
                return;
            }

            if (!link_sdk_only)
            {
                if (!Annotations.HasAction(assembly))                  // stray assembly not picked up when resolving references
                {
                    Annotations.SetAction(assembly, AssemblyAction.Link);
                }

                return;
            }

            if (Profile.IsSdkAssembly(assembly) || Profile.IsProductAssembly(assembly))
            {
                Annotations.SetAction(assembly, AssemblyAction.Link);
                return;
            }

            ProcessUserAssembly(assembly);
        }
Esempio n. 3
0
        protected override void ProcessAssembly(AssemblyDefinition assembly)
        {
            if (need_https)
            {
                return;
            }

            if (Profile.IsSdkAssembly(assembly) || Profile.IsProductAssembly(assembly))
            {
                return;
            }

            if (HasNeededReference(assembly.MainModule))
            {
                need_https = true;
            }
        }
Esempio n. 4
0
 static bool IsProductType(TypeDefinition type)
 {
     return(Profile.IsProductAssembly(type.Module.Assembly));
 }