Solar Powered Netduino

Advertisements
Posted in Brian By Experience, Brian's Code Extreme, C# | Tagged | Leave a comment

Been a while since I have posted, again…

I have been busy with my new YouTube channel. My new Netduino, Arduino, Raspberry Pi 2, Job, Biblical Research, etc.

So I may just focus on making my new posts all YouTube posts, except for technical articles, then share them here.

My regular subscribers have been my motivation, and I don’t want to forget about you. So expect another video over the weekend, followed by some more helpful code.

Posted in Brian By Experience, Brian's Code Extreme | Tagged | Leave a comment

Word of the day!

TUPLE

as in System.Tuple

Look it up

 

Posted in Brian By Experience, Brian's Code Extreme, C# | Tagged | Leave a comment

Fear, the evidence that you are not trusting God

Posted in Brian By Experience, Christianity, Liberty | Tagged , , , | Leave a comment

Interesting Challenges to Science

Interesting video, even if you are not a Christian. Heck, I would love to see atheists beet this guy in a debate.

Posted in Brian By Experience | Leave a comment

Why I am anti-war. A review of Mathew 24

Posted in Brian By Experience | Leave a comment

Your own plugin lib for your .NET application

The code sample below assumes that you have your interface class wrapped in another assembly. And that your DLLs are based on that assembly.
If anything varies from this, then the code below will not work.

Header

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;

In your main method.

string appPath = Path.GetDirectoryName(Application.ExecutablePath);
string filePath = System.IO.Path.Combine(appPath,"Plugins"); //Directory of where your plugins are stored.
string[] dllList = Directory.GetFiles(filePath);

foreach (string dll in dllList)
{
    Assembly o = Assembly.LoadFile(dll);
    List<Type> types = o.GetTypes().Where(n => n.GetInterface("IMyInterfaceClass") != null).ToList(); //Limit to only useful types.
    if (types.Count > 0)
    {
        MyDLLAssembliesList.Add((MyInterfaceAssembly.IMyInterface) o.CreateInstance(types[0].FullName));
  }
}
Posted in Brian By Experience | 1 Comment