References

References

Postby _Retaliate_ » 29 Mar 2014, 19:06

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
   {
   }
}
Last edited by _Retaliate_ on 29 Mar 2014, 19:10, edited 1 time in total.
Image
_Retaliate_
 
Posts: 68
Joined: 26 Sep 2013, 11:16

Re: References

Postby Leeizazombie » 29 Mar 2014, 19:08

I agree, I wanted to make a custom IRC connection to make my own Bot but it didn't use the reference Meebey :/
Owner of:
LeeIzaZombie Freebuild and Lava Survival V2 (Shut Down and updated)
LeeIzaZombie Survival (Comming back soon)

Contact:
Skype: leeizazombie
IRC: irc.geekshed.net, #leeizazombie, #mcclassichosting
User avatar
Leeizazombie
 
Posts: 536
Joined: 10 Jun 2013, 17:45
Location: Ireland.

Re: References

Postby dzienny » 02 Apr 2014, 23:59

This feature was added in the version 11.2! More info in the changelog. Have fun ;)
User avatar
dzienny
Administrator
 
Posts: 1181
Joined: 23 Jan 2011, 14:27

Re: References

Postby _Retaliate_ » 03 Apr 2014, 10:52

dzienny wrote:This feature was added in the version 11.2! More info in the changelog. Have fun ;)

Thanks.
Image
_Retaliate_
 
Posts: 68
Joined: 26 Sep 2013, 11:16


Return to Requests for Addon

Who is online

Users browsing this forum: No registered users and 1 guest

cron