{"action":"created","issue":{"url":"https://api.github.com/repos/ArxOne/Weavisor/issues/5","labels_url":"https://api.github.com/repos/ArxOne/Weavisor/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/ArxOne/Weavisor/issues/5/comments","events_url":"https://api.github.com/repos/ArxOne/Weavisor/issues/5/events","html_url":"https://github.com/ArxOne/Weavisor/issues/5","id":56588325,"number":5,"title":"Add custom field to target","user":{"login":"picrap","id":251429,"avatar_url":"https://avatars.githubusercontent.com/u/251429?v=3","gravatar_id":"","url":"https://api.github.com/users/picrap","html_url":"https://github.com/picrap","followers_url":"https://api.github.com/users/picrap/followers","following_url":"https://api.github.com/users/picrap/following{/other_user}","gists_url":"https://api.github.com/users/picrap/gists{/gist_id}","starred_url":"https://api.github.com/users/picrap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/picrap/subscriptions","organizations_url":"https://api.github.com/users/picrap/orgs","repos_url":"https://api.github.com/users/picrap/repos","events_url":"https://api.github.com/users/picrap/events{/privacy}","received_events_url":"https://api.github.com/users/picrap/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ArxOne/Weavisor/labels/enhancement","name":"enhancement","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-04T21:13:51Z","updated_at":"2015-02-05T16:48:29Z","closed_at":null,"body":"In order to inject specific data for aspect (storing data in aspect is **unsafe**).\r\n"},"comment":{"url":"https://api.github.com/repos/ArxOne/Weavisor/issues/comments/73080721","html_url":"https://github.com/ArxOne/Weavisor/issues/5#issuecomment-73080721","issue_url":"https://api.github.com/repos/ArxOne/Weavisor/issues/5","id":73080721,"user":{"login":"picrap","id":251429,"avatar_url":"https://avatars.githubusercontent.com/u/251429?v=3","gravatar_id":"","url":"https://api.github.com/users/picrap","html_url":"https://github.com/picrap","followers_url":"https://api.github.com/users/picrap/followers","following_url":"https://api.github.com/users/picrap/following{/other_user}","gists_url":"https://api.github.com/users/picrap/gists{/gist_id}","starred_url":"https://api.github.com/users/picrap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/picrap/subscriptions","organizations_url":"https://api.github.com/users/picrap/orgs","repos_url":"https://api.github.com/users/picrap/repos","events_url":"https://api.github.com/users/picrap/events{/privacy}","received_events_url":"https://api.github.com/users/picrap/received_events","type":"User","site_admin":false},"created_at":"2015-02-05T16:48:29Z","updated_at":"2015-02-05T16:48:29Z","body":"Possible implementation\r\nadding a field of a special type in advice\r\n```csharp\r\npublic class MyAdvice: Attribute, IMethodAdvice\r\n{\r\n    // this will inject a field of type int in the advised type\r\n    public Property<int> SomeProperty;\r\n\r\n    public void Advise(MethodAdviceContext context)\r\n    {\r\n        SomeProperty[context] = 12;\r\n    }\r\n}\r\n```\r\nWhere the weaver needs to :\r\n - analyse advices and inject extra fields in advised target type.\r\n - generate a ctor in the advice itself to initialize fields\r\n - *or* make the interception check advice fields before calling it (which is easier to implement)\r\n\r\n"}}