Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NET Framework 3.0 Change #1

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

NET Framework 3.0 Change #1

wants to merge 4 commits into from

Conversation

pirasunt
Copy link

  • This PR represents changes to the Mono.Addins project so that it can target .NET Framework V3
  • The purpose of this change is so that this Addin can be used in .NET 3.0 projects

{
string sid = desc.AddinId + " " + desc.Domain;
if (!inserted.Add (sid))
if (inserted.Contains (sid))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You do not add here, which means you may see more cases where you contain it than you should.

@@ -56,7 +56,7 @@ public void VisitFolder (IProgressStatus monitor, string path, string domain, bo
void VisitFolderInternal (IProgressStatus monitor, string path, string domain, bool recursive)
{
// Avoid folders including each other
if (!visitedFolders.Add (path) || ScanContext.IgnorePath (path))
if (visitedFolders.Contains (path) || ScanContext.IgnorePath (path))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add again.


try
{
Version av = new Version(dirName.Substring(1, i - 1));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dirName.Substring could theorically fail silently here, whereas it could not before.

foreach (var prop in properties)
{
var stringToCheck = prop.Name + " " + prop.Locale;
if (props.Contains(stringToCheck))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again

@@ -805,7 +805,7 @@ internal void ActivateRoots ()

void CheckHostAssembly (Assembly asm)
{
if (AddinDatabase.RunningSetupProcess || asm is System.Reflection.Emit.AssemblyBuilder || asm.IsDynamic)
if (AddinDatabase.RunningSetupProcess || asm is System.Reflection.Emit.AssemblyBuilder || asm.ManifestModule is System.Reflection.Emit.ModuleBuilder)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 100% convinced here, some people seem to disagree on this in stackoverflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants