Category: stankins

Obtaining list of videos from a youtube playlist with Stankins

Because Stankins has a parser to html, you can have this kind of macro

#see all href

Stankins.HTML.ReceiverHtmlAHref file=

#retain href column
StankinsObjects.FilterRetainColumnDataContains namecolumn=href stringToHave=PL4aSKgR4yk4OnmJW6PlBuDOXdYk6zTGps

#retain just videos which title contains 5Min

StankinsObjects.FilterRetainColumnDataContains namecolumn=a_text stringToHave=5Min

#remove column a_html

StankinsObjects.FilterRemoveColumn namecolumn=a_html

#transform column to li a href

StankinsObjects.TransformerAddColumnExpressionByTable expression=”‘<li><a href=’+ href+’>’ + a_text+'</a></li>'” newcolumnname=test nametable=TableLinks

#remove column href

StankinsObjects.FilterRemoveColumn namecolumn=href

#remove column a_text

StankinsObjects.FilterRemoveColumn namecolumn=a_text


The demo is at

.NET Core Alphabet

What I wanted is a simple application ( Web, Mobile, Desktop) that can list , alphabetically, the .NET Core keywords. What is the purpose?

  1. For interviews – suppose you want to test the people knowledge in C#. You start the application( again: Desktop or Web or Mobile) and let the candidate choose a letter. Then you see the keywords for this letter and ask the candidate to explain some of the keywords
  2. For remembering features: there are so many features in .NET language ( ) that for a programmer it is good to know – or to revisit – the features that are in the language.
  3. For contest within programmers  – like the interviews, but for the passionate programmers that want to have an easy way to decide the one with the best memory
  4. Maybe other uses that I do not know  ? Please share in comments

Now with the realization: What I want is the simple application, that has inside the database with keywords and links and any others. From this database, the code sources for the data will be generated and the application(s) will be generated. Also, data should be publicly available to profit from the crowd power –anyone that want to add something can add.

stankins.console execute -o ReceiveRestFromFile -a primaryData/netCoreAlphabet.json -o SenderToTypeScript -a “” -o TransformerConcatenateOutputString -a a.ts -o SenderOutputToFolder -a $(Build.ArtifactStagingDirectory)/data/ -a false

stankins.console execute -o ReceiveRestFromFile -a primaryData/netCoreAlphabet.json -o SenderToRazorFromFile -a primaryData/markdown.txt -o TransformerConcatenateOutputString -a -o SenderOutputToFolder -a $(Build.ArtifactStagingDirectory)/data/ -a false

And to complete all those, it will be put in an AzureDevops pipeline 

You can see the result on Android :  , WebSite:

Also, if you want , please contribute by making a PR by editing or by contributing to enchance the application by solving

Dynamic loading controllers in .NET Core

I needed to load dynamically some controllers to the Stankins application .Dynamic like in – written in some text file, then loading them, The best reference was . But it was not enough : what I wanted is to write the controller in some text file and compile and load them.

First problem ; What about the dll’s to be loaded  ?

I ended up with this code :

var refs=new List<MetadataReference>();
var ourRefs=Assembly.GetEntryAssembly().GetReferencedAssemblies();

foreach(var item in ourRefs)
	var ass=Assembly.Load(item);
//MetadataReference NetStandard = MetadataReference.CreateFromFile(Assembly.Load("netstandard, Version=").Location);
MetadataReference NetStandard = MetadataReference.CreateFromFile(Assembly.Load("netstandard").Location);
refs.Add(MetadataReference.CreateFromFile(typeof(object).GetTypeInfo().Assembly.Location) );             

Second problem: where to put the errors ? The simplest option ( not the best one) is to put as comments to the end of the file – at reloading I will find them and correct

using (var ms = new MemoryStream())
	var res = compilation.Emit(ms);

	if (!res.Success)
		string diag=string.Join(Environment.NewLine, res.Diagnostics.Select(it=>it.ToString()));
		return null;

( Better – to display the error inline…)

Third problem: The controlers are loaded at initial step of configuring .NET MVC Core 2.x , not later. The assembly loader /unloader will come as a feature at .NET Core 3 – so not yet. I figure up that the best solution is to re-load the application

static CancellationTokenSource cancel ;
        static bool InternalRequestRestart;
        public async static Task Main(string[] args)
                cancel= new CancellationTokenSource();
                await CreateWebHostBuilder(args).Build().RunAsync(cancel.Token);
                await Task.Delay(10);//just waiting some time

        public static void Shutdown()


You can find the code source for loading the controllers at

You can find the code source for restarting the application at

You can test the code at ( add a new controller , hit save and then access the route – or swagger at

– or you can try with Docker with

( for linux containers)

docker run -p 5000:5000 ignatandrei/stankins_linux

( for windows containers)

docker run -p 5000:5000 ignatandrei/stankins_linux

( restart docker if any problems)

and access http://localhost:5000/receiveData

That’s all 😉

Andrei Ignat weekly software news(mostly .NET)

* indicates required

Please select all the ways you would like to hear from me:

You can unsubscribe at any time by clicking the link in the footer of our emails. For information about our privacy practices, please visit our website.

We use Mailchimp as our marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp's privacy practices here.