static public TIAttributes GetAttributesEntity <Entity, TIAttributes>(Entity entity) { dynamic it = entity; var stringPairProxy = new StringPairProxy(it.Attributes); stringPairProxy.StringPairUpdatedEvent += updatedStringPair => it.Attributes = updatedStringPair; return(stringPairProxy.GenEntityProxy <TIAttributes>()); }