Page 1 of 1

References

PostPosted: 29 Mar 2014, 19:06
by _Retaliate_
I think a cool feature to add would be to have the ability to add links to .dlls in your code as comments in the first lines, and when it was compiled, mcdzienny would add the references to those .dlls.
Something like this:
Code: Select all
using System;
using System.IO;
using System.Reflection;
using System.Collections.Generic;
public List<AssemblyName> GetReferences(string csfile)
{
   List<AssemblyName> returnarray = new List<AssemblyName>();
   string[] lines = File.ReadAllLines(csfile);
   for(int x = 0; x < lines.Length; x++) {
      if(!lines[x].StartsWith("//")) {
         break;
      }
      string file = lines[x].Substring(2);
      if(File.Exists(file)) {
         returnarray.Add(Assembly.LoadFile(file).GetName());
      }
   }
   return returnarray;
}

And an example command with custom references:
Code: Select all
//C:\Users\Tom\Desktop\Connor\Minecraft_Server\Classic\MCDzienny\IRCLibrary.dll
using System;
using IRCLibrary;
namespace MCDzienny
{
   public class CmdExample : Command
   {
   }
}

Re: References

PostPosted: 29 Mar 2014, 19:08
by Leeizazombie
I agree, I wanted to make a custom IRC connection to make my own Bot but it didn't use the reference Meebey :/

Re: References

PostPosted: 02 Apr 2014, 23:59
by dzienny
This feature was added in the version 11.2! More info in the changelog. Have fun ;)

Re: References

PostPosted: 03 Apr 2014, 10:52
by _Retaliate_
dzienny wrote:This feature was added in the version 11.2! More info in the changelog. Have fun ;)

Thanks.