{"id":10917,"date":"2008-11-13T10:48:00","date_gmt":"2008-11-13T10:48:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/bharry\/2008\/11\/13\/extending-the-new-tfs-team-members-power-tool\/"},"modified":"2018-08-14T00:22:22","modified_gmt":"2018-08-14T00:22:22","slug":"extending-the-new-tfs-team-members-power-tool-2","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/bharry\/extending-the-new-tfs-team-members-power-tool-2\/","title":{"rendered":"Extending the new TFS Team Members Power Tool"},"content":{"rendered":"<p>The October release of the Team Foundation Power Tools includes a new feature called &#8220;Team Members&#8221; that allows you to collaborate with your team even better.&nbsp; One of the features is integration with instant messaging that allows you to see presence, IM, video, audio, etc from inside Team Explorer.&nbsp; You can read more about the feature here: <a href=\"http:\/\/blogs.msdn.com\/bharry\/archive\/2008\/10\/01\/preview-of-the-next-tfs-power-tools-release.aspx\">http:\/\/blogs.msdn.com\/bharry\/archive\/2008\/10\/01\/preview-of-the-next-tfs-power-tools-release.aspx<\/a>.<\/p>\n<p>One of the key design points of this new IM integration is extensibility.&nbsp; The Power Tools included providers for Office Communicator and Live Messenger.&nbsp; However, there are a ton of other IM systems\/clients out there and we wanted to make sure no one would be left out in the cold.&nbsp; As a proof point, one of our MVP&#8217;s has just announced a new provider for Skype.&nbsp; You can read about it here: <a href=\"http:\/\/msmvps.com\/blogs\/vstsblog\/archive\/2008\/11\/13\/skype-collaboration-provider-for-tfs.aspx\">http:\/\/msmvps.com\/blogs\/vstsblog\/archive\/2008\/11\/13\/skype-collaboration-provider-for-tfs.aspx<\/a>.&nbsp; Further, we&#8217;ve created a CodePlex project for people who want to write and share TFS collaboration providers (and the Skype provider will be uploaded shortly).&nbsp; You&#8217;ll find the CodePlex project here: <a href=\"http:\/\/www.codeplex.com\/tfscollab\"><font face=\"Calibri\" size=\"3\">http:\/\/www.codeplex.com\/tfscollab<\/font><\/a><\/p>\n<p>If you are interested in building a provider, you can look at the Skype example.&nbsp; I&#8217;ve also included here some basic information on getting started.&nbsp; I&#8217;ve attached in a zip file that contains the source code for all of the provider interfaces and support code.&nbsp; You will find 3 files in the zip:<\/p>\n<ul>\n<li>\n<div><strong>Interfaces.cs<\/strong> &#8211; The set of interfaces, abstract classes, enums, exceptions and the like that are necessary to write a provider.<\/div>\n<\/li>\n<li>\n<div><strong>CollaborationProviderBase.cs<\/strong> &#8211; Some base classes that implement portions of the provider interfaces and are likely to be the same regardless of your provider.&nbsp; You can use them or not.&nbsp; They may save you a little typing.<\/div>\n<\/li>\n<li>\n<div><strong>CollaborationProviderFactory.cs<\/strong> &#8211; Code that is used to enumerate available providers and to load them.&nbsp; You really don&#8217;t need this code but it might be helpful if you are trying to understand why TFS is not finding your provider.<\/div>\n<\/li>\n<\/ul>\n<p>All of this is&nbsp;in the Microsoft.TeamFoundation.Collaboration.dll that comes with the Power Tool download &#8211; you can see them with intellisense, but&nbsp;having some of the comments might be useful.<\/p>\n<p>You start building a provider by creating a class that implements ICollaborationProvider (or inherits from CollaborationProviderBase).&nbsp; Implementing it will require to you implement a few more classes:<\/p>\n<ul>\n<li>\n<div>A class that derives from Contact for returning information about contacts that your provider knows about.<\/div>\n<\/li>\n<li>\n<div>A class that implements IContactGroup (if your provider supports groups of contacts).<\/div>\n<\/li>\n<li>\n<div>A class that derives from PhoneNumberCollection and one from PhoneNumber for returning phone numbers for a contact.<\/div>\n<\/li>\n<li>\n<div>A class that implements IConversation for returning active conversations.<\/div>\n<\/li>\n<li>\n<div>A class that derives from PresenceChangedEventArgs<\/div>\n<\/li>\n<\/ul>\n<p>Once you&#8217;ve built all of the classes you can copy your dll into the PublicAssemblies\\CollaborationProviders folder under your Team Explorer installation and TFS will provide it as a choice in the list of available providers.<\/p>\n<p>A few random comments that may help you getting started.<\/p>\n<ul>\n<li>\n<div>Much of the interface is optional (you don&#8217;t need to implement it).&nbsp; The big hint is that if you look in CollaborationProviderBase, you will find some methods that are abstract and some that are implemented but throw a NotImplementedException.&nbsp; You must implement the abstract methods.&nbsp; You only need to implement the &#8220;NotImplementedException&#8221; methods if you want to.&nbsp; I haven&#8217;t tested this distinction extensively but that&#8217;s the intent.&nbsp; Let me know if I missed something.<\/div>\n<\/li>\n<li>\n<div>Look at the CollaborationCapability enumeration that is passed to IsSupportedCapability.&nbsp; This is another good way to tell the consumer about what capability your provider does (or does not) support.<\/div>\n<\/li>\n<li>\n<div>ProviderName, ProviderReadiness, IsSupportedCapability, SignIn, AutoSignIn and SignInStatus&nbsp;need to work even when noone is singed in to the provider.<\/div>\n<\/li>\n<li>\n<div>Before the rest of the interfaces can be used, the client must successfully sign in with AutoSignIn or SignIn.<\/div>\n<\/li>\n<li>\n<div>Team Explorer does a lot of collaboration provider interaction on a background thread and some on a foreground thread &#8211; therefore your provider must work for both (and should never block the foreground thread if called on a background thread).<\/div>\n<\/li>\n<li>\n<div>Team Explorer will call your provider on multiple threads simultaneously (it needs to be thread safe).<\/div>\n<\/li>\n<li>\n<div>Look at the comments in interfaces.cs.&nbsp; I&#8217;m a bit behind on documenting the methods but there&#8217;s a fair amount in there.&nbsp; I&#8217;ll update it when I get a chance.<\/div>\n<\/li>\n<\/ul>\n<p>There&#8217;s probably more I should tell you.&nbsp; Feel free to ask questions about anything you run into and I&#8217;ll update the post as I see more things people are going to want to know.<\/p>\n<p>Brian<\/p>\n<p><a href=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Components.PostAttachments\/00\/09\/06\/65\/37\/CollaborationInterface.zip\">CollaborationInterface.zip<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The October release of the Team Foundation Power Tools includes a new feature called &#8220;Team Members&#8221; that allows you to collaborate with your team even better.&nbsp; One of the features is integration with instant messaging that allows you to see presence, IM, video, audio, etc from inside Team Explorer.&nbsp; You can read more about the [&hellip;]<\/p>\n","protected":false},"author":244,"featured_media":14617,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[5],"class_list":["post-10917","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-tfs"],"acf":[],"blog_post_summary":"<p>The October release of the Team Foundation Power Tools includes a new feature called &#8220;Team Members&#8221; that allows you to collaborate with your team even better.&nbsp; One of the features is integration with instant messaging that allows you to see presence, IM, video, audio, etc from inside Team Explorer.&nbsp; You can read more about the [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/posts\/10917","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/users\/244"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/comments?post=10917"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/posts\/10917\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/media\/14617"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/media?parent=10917"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/categories?post=10917"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/tags?post=10917"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}