{"issue":{"user":{"id":675786,"login":"slebherz","url":"https://api.github.com/users/slebherz","avatar_url":"https://secure.gravatar.com/avatar/38b13dfe5deeefec9f8afc8ee135f039?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"38b13dfe5deeefec9f8afc8ee135f039"},"milestone":null,"title":"Discussion Request: Might want an OasisEventBase that doesn't require IFormattable parameters","created_at":"2011-12-09T22:27:44Z","labels":[],"state":"open","updated_at":"2011-12-22T21:00:01Z","id":2507830,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"html_url":"https://github.com/hydrologics/Oasis.Base/issues/31","closed_at":null,"body":"I'd like to be able to have an event that looks like this:\r\n\r\n```csharp\r\npublic class OpenThisItemInAnotherWindowEvent : OasisEventBase<IAmARunViewer, IList<IHaveMetadata>>\r\n    {\r\n        public OpenThisItemInAnotherWindowEvent(IAmARunViewer runViewer, IList<IHaveMetadata> runElements) : \r\n        base(runViewer, runElements, System.Diagnostics.TraceEventType.Information) { }\r\n    }\r\n```\r\n\r\nbut the problem is that the IList<IHaveMetadata> isn't IFormattable, which is required of the type parameters to OasisEventBase<T1, T2>. Here is Visual Studio saying the same:\r\n\r\nThe type 'System.Collections.Generic.IList<Oasis.DataModel.Interfaces.IHaveMetadata>' cannot be used as type parameter 'T2' in the generic type or method 'Oasis.Foundation.Events.OasisEventBase<T1,T2>'. There is no implicit reference conversion from 'System.Collections.Generic.IList<Oasis.DataModel.Interfaces.IHaveMetadata>' to 'System.IFormattable'.\r\n\r\nSo, I think that I can make the event generic and say that the event parameter is IList<T> where T : IFormattable. But then I've got this generic event that I don't really want to be generic.\r\n\r\nWhat if we make an OasisEventBase<T1, T2> that doesn't require T1 and T2 to implement IFormattable? I guess we would lose the event logging for those events (maybe we could call it OasisNoLogEventBase). Any thoughts on this? How bad would it be to lose the logging on some events? Are there any other complications?\r\n\r\n","number":31,"url":"https://api.github.com/repos/hydrologics/Oasis.Base/issues/31","comments":2,"assignee":{"id":340268,"login":"johnmetta","url":"https://api.github.com/users/johnmetta","avatar_url":"https://secure.gravatar.com/avatar/0e64003bbce0fbb3139945bda9d0d630?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"0e64003bbce0fbb3139945bda9d0d630"}},"comment":{"user":{"id":340268,"login":"johnmetta","url":"https://api.github.com/users/johnmetta","avatar_url":"https://secure.gravatar.com/avatar/0e64003bbce0fbb3139945bda9d0d630?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"0e64003bbce0fbb3139945bda9d0d630"},"created_at":"2011-12-22T21:00:00Z","updated_at":"2011-12-22T21:00:00Z","id":3254780,"body":"I can implement this today, just forgot about it. I'll either push it in with my metadata stuff or just branch from master and get it to him if it's looking like it'll take too long.","url":"https://api.github.com/repos/hydrologics/Oasis.Base/issues/comments/3254780"},"action":"created"}