wpf - C# Uri generator for resources -


i write property, construct resource uri.

i have base class in myproject.common assembly has implementation like

class abstract baseitem {     public abstract string path { get; }     public uri path     {         return new uri(string.format("/{0};component{1}", assembly.getexecutingassembly().fullname, path ), urikind.relative);     } 

and implementations in different assemblies.

problem: assembly.getexecutingassembly().fullname return myproject.common assembly, not implementation assembly

question: how archieve that?

it should work if assembly actual derived type of baseitem:

public abstract class baseitem {     public abstract string path { get; }      public uri uri     {                 {             return new uri(string.format("pack://application:,,,/{0};component/{1}",                 this.gettype().assembly.fullname, path));         }     } } 

Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -