C# distinguishing incoming objects using attribute -


i need way of distinguishing class objects user passing custom control. reason this, can handle logic on end, extracted , uncontrollable user. user pass in object collections this...

<grid>     <nexus:nexuseditor          sourceteams="{binding teams}"         sourceplayers="{binding players}"         sourcelocations="{binding locations}"/> </grid> 

if forloop through these objects in custom control, need way of marking incoming objects know source there passed through.

this can't done @ runtime , arguably wrong design in c#. there other ways solve this. can, example, create wrapper around connection class , inject instance of connection it. connectionwrapper can inherit abstractbase

public class connectionwrapper: abstractbase {    public connectionwrapper(connection connnection)    {     }     private override int _type {get; set;} } 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -