Reference.Services Sample

This sample shows how to be a Visual Studio service provider and how to consume Visual Studio services.

 
 
 
 
 
(0)
4,963 times
Add to favorites
2/22/2011
E-mail Twitter del.icio.us Digg Facebook

Solution explorer

VB.NET
C#
C#, C++
<?xml version="1.0" encoding="utf-8"?>
<VisioDocument>
	<DocumentProperties>
		<Title></Title>
		<HyperlinkBase href=""></HyperlinkBase>
	</DocumentProperties>
	<Pages>
		<Page ID="13" Name="ServiceConsumerPackageHierarchy" NameU="ServiceConsumerPackageHierarchy">
			<Shapes>
				<Shape ID="1" UniqueID="{CA12D34F-745D-4735-8D76-5A11CA3BEE7B}" Name="Watermark Title" NameU="Watermark Title" Master="18">
					<Text>Static Structure</Text>
					<XForm>
						<PinX Unit="MM">0.000000000000000</PinX>
						<PinY Unit="MM">10.999999999999998</PinY>
					</XForm>
				</Shape>
				<Shape ID="2" UniqueID="{8FB9DB84-5B99-4740-A8C1-86F48CD36E33}" Name="Class" NameU="Class" Master="22">
					<XForm>
						<PinX Unit="MM">4.114173228346456</PinX>
						<PinY Unit="MM">4.409448818897637</PinY>
					</XForm>
				</Shape>
				<Shape ID="9" UniqueID="{E7B8E475-971C-4FFA-B784-52A4DBF6857C}" Name="Name" NameU="Name">
					<Text>ServiceConsumerPackage</Text>
					<XForm>
						<PinX Unit="MM">4.114173228346456</PinX>
						<PinY Unit="MM">4.584645669291337</PinY>
					</XForm>
				</Shape>
				<Shape ID="11" UniqueID="{FB0A7AD8-8C3B-460C-B0F4-44A1B63C4C15}" Name="Class.11" NameU="Class.11" Master="22">
					<XForm>
						<PinX Unit="MM">4.101562373462136</PinX>
						<PinY Unit="MM">9.448818897637795</PinY>
					</XForm>
				</Shape>
				<Shape ID="18" UniqueID="{0FEB80F8-F17B-4EB3-90D7-C3E0DAC45A5A}" Name="Name" NameU="Name">
					<Text>VSL::IVsPackageImpl</Text>
					<XForm>
						<PinX Unit="MM">4.101562373462136</PinX>
						<PinY Unit="MM">9.624015748031495</PinY>
					</XForm>
				</Shape>
				<Shape ID="19" UniqueID="{822383BE-2C66-4C04-8701-1A7E2348CBA3}" Name="Parameters" NameU="Parameters">
					<Text>DerivedClass_T, clsidPackage_T, VsSiteCache_T, LoadUILibrary_T</Text>
					<XForm>
						<PinX Unit="MM">4.695054662509229</PinX>
						<PinY Unit="MM">9.822454754435753</PinY>
					</XForm>
				</Shape>
				<Shape ID="20" UniqueID="{8525564B-2CC3-42BA-A12B-AFA3766655C2}" Name="Generalization" NameU="Generalization" Master="24">
					<XForm>
						<PinX Unit="MM">4.108362352293839</PinX>
						<PinY Unit="MM">6.880111205459287</PinY>
					</XForm>
				</Shape>
				<Shape ID="22" UniqueID="{D10C38B6-29B0-4E84-AE9E-8119B4AAB669}" Name="Class.22" NameU="Class.22" Master="22">
					<XForm>
						<PinX Unit="MM">6.515748031496062</PinX>
						<PinY Unit="MM">7.952755905511811</PinY>
					</XForm>
				</Shape>
				<Shape ID="29" UniqueID="{226CC04B-CA28-4429-88B6-A3A7CD5225AF}" Name="Name" NameU="Name">
					<Text>VSL::ISupportErrorInfoImpl</Text>
					<XForm>
						<PinX Unit="MM">6.515748031496062</PinX>
						<PinY Unit="MM">8.127952755905511</PinY>
					</XForm>
				</Shape>
				<Shape ID="30" UniqueID="{1A5F63C7-71C1-46A9-856E-54ADAAE72BF6}" Name="Parameters" NameU="Parameters">
					<Text>InterfaceList_T</Text>
					<XForm>
						<PinX Unit="MM">7.266386774400576</PinX>
						<PinY Unit="MM">8.326391762309772</PinY>
					</XForm>
				</Shape>
				<Shape ID="31" UniqueID="{B4FD4B4F-41CC-4A29-9614-20861D002DFA}" Name="Generalization.31" NameU="Generalization.31" Master="24">
					<XForm>
						<PinX Unit="MM">5.281734165239991</PinX>
						<PinY Unit="MM">6.132079709396296</PinY>
					</XForm>
				</Shape>
				<Shape ID="33" UniqueID="{FB6E00AA-1100-4E04-AE1B-640ED17F1C8D}" Name="Class.33" NameU="Class.33" Master="22">
					<XForm>
						<PinX Unit="MM">2.480314960629921</PinX>
						<PinY Unit="MM">7.755905511811023</PinY>
					</XForm>
				</Shape>
				<Shape ID="40" UniqueID="{60EB664F-5D97-484B-99BB-147436D88C43}" Name="Name" NameU="Name">
					<Text>VSL::IOleCommandTargetImpl</Text>
					<XForm>
						<PinX Unit="MM">2.480314960629921</PinX>
						<PinY Unit="MM">7.931102362204724</PinY>
					</XForm>
				</Shape>
				<Shape ID="41" UniqueID="{71126567-A092-4E93-B491-C5FD77AA01F3}" Name="Parameters" NameU="Parameters">
					<Text>Target_T</Text>
					<XForm>
						<PinX Unit="MM">3.311333189618420</PinX>
						<PinY Unit="MM">8.129541368608983</PinY>
					</XForm>
				</Shape>
				<Shape ID="42" UniqueID="{A8079C8A-A345-449C-AF02-B285D7D91386}" Name="Generalization.42" NameU="Generalization.42" Master="24">
					<XForm>
						<PinX Unit="MM">3.321178683800539</PinX>
						<PinY Unit="MM">6.033654512545901</PinY>
					</XForm>
				</Shape>
				<Shape ID="44" UniqueID="{20365A26-A14F-4A95-9FD1-04A79CB2F037}" Name="Interface" NameU="Interface" Master="23">
					<Text>IOleCommandTarget</Text>
					<XForm>
						<PinX Unit="MM">1.505546731641423</PinX>
						<PinY Unit="MM">7.755905511811023</PinY>
					</XForm>
				</Shape>
				<Shape ID="45" UniqueID="{61237019-F626-4F18-90F8-789FFFF6A446}" Name="Interface.45" NameU="Interface.45" Master="23">
					<Text>IVsPackage</Text>
					<XForm>
						<PinX Unit="MM">3.364320084415045</PinX>
						<PinY Unit="MM">9.448818897637795</PinY>
					</XForm>
				</Shape>
				<Shape ID="46" UniqueID="{0EA2DAF7-4198-4796-96A4-BA200DD20188}" Name="Interface.46" NameU="Interface.46" Master="23">
					<Text>ISupportErrorInfo</Text>
					<XForm>
						<PinX Unit="MM">5.621359288591548</PinX>
						<PinY Unit="MM">7.952755905511811</PinY>
					</XForm>
				</Shape>
			</Shapes>
		</Page>
		<Page ID="0" Name="ServiceProviderPackageHierarchy" NameU="Static Structure-1">
			<Shapes>
				<Shape ID="1" UniqueID="{906DB523-2BA4-4986-A7E4-749524F4E798}" Name="Watermark Title" NameU="Watermark Title" Master="18">
					<Text>Static Structure</Text>
					<XForm>
						<PinX Unit="MM">0.000000000000000</PinX>
						<PinY Unit="MM">10.999999999999998</PinY>
					</XForm>
				</Shape>
				<Shape ID="2" UniqueID="{EA5F055C-4B16-4867-BA57-B0CEC5D25A5E}" Name="Class" NameU="Class" Master="22">
					<XForm>
						<PinX Unit="MM">4.311023622047244</PinX>
						<PinY Unit="MM">4.133858267716535</PinY>
					</XForm>
				</Shape>
				<Shape ID="9" UniqueID="{60134918-62B9-43DB-8F6B-8D5DF6CA077A}" Name="Name" NameU="Name">
					<Text>ServiceProviderPackage</Text>
					<XForm>
						<PinX Unit="MM">4.311023622047244</PinX>
						<PinY Unit="MM">4.309055118110236</PinY>
					</XForm>
				</Shape>
				<Shape ID="11" UniqueID="{6477F7C9-92AF-4181-8B61-B227F6FB7C4C}" Name="Class.11" NameU="Class.11" Master="22">
					<XForm>
						<PinX Unit="MM">4.330708661417322</PinX>
						<PinY Unit="MM">9.055118110236220</PinY>
					</XForm>
				</Shape>
				<Shape ID="18" UniqueID="{B50C1D44-55E5-4989-8F74-E17EB79AE16B}" Name="Name" NameU="Name">
					<Text>VSL::IVsPackageImpl</Text>
					<XForm>
						<PinX Unit="MM">4.330708661417322</PinX>
						<PinY Unit="MM">9.230314960629920</PinY>
					</XForm>
				</Shape>
				<Shape ID="19" UniqueID="{765A4FD1-A9C6-43D0-8FB5-3B363B2FFE39}" Name="Parameters" NameU="Parameters">
					<Text>DerivedClass_T, clsidPackage_T, VsSiteCache_T, LoadUILibrary_T</Text>
					<XForm>
						<PinX Unit="MM">4.924200950464415</PinX>
						<PinY Unit="MM">9.428753967034179</PinY>
					</XForm>
				</Shape>
				<Shape ID="20" UniqueID="{4D2821F0-B8AA-4966-B7D3-CFB689F97249}" Name="Generalization" NameU="Generalization" Master="24">
					<XForm>
						<PinX Unit="MM">4.320670051121049</PinX>
						<PinY Unit="MM">6.545465536167949</PinY>
					</XForm>
				</Shape>
				<Shape ID="22" UniqueID="{D3B1138D-CF47-4CB8-930A-BA42061BD1C1}" Name="Class.22" NameU="Class.22" Master="22">
					<XForm>
						<PinX Unit="MM">6.476377952755906</PinX>
						<PinY Unit="MM">7.362204724409448</PinY>
					</XForm>
				</Shape>
				<Shape ID="29" UniqueID="{7D759D52-575D-4EA3-A4A6-57B796D8EFBA}" Name="Name" NameU="Name">
					<Text>VSL::ISupportErrorInfoImpl</Text>
					<XForm>
						<PinX Unit="MM">6.476377952755906</PinX>
						<PinY Unit="MM">7.537401574803149</PinY>
					</XForm>
				</Shape>
				<Shape ID="30" UniqueID="{1CE88EC5-6E82-4000-ADE0-3929C67FDF3F}" Name="Parameters" NameU="Parameters">
					<Text>InterfaceList_T</Text>
					<XForm>
						<PinX Unit="MM">7.227016695660419</PinX>
						<PinY Unit="MM">7.735840581207409</PinY>
					</XForm>
				</Shape>
				<Shape ID="31" UniqueID="{57B54BF9-68F6-4E99-9656-7065F5211900}" Name="Generalization.31" NameU="Generalization.31" Master="24">
					<XForm>
						<PinX Unit="MM">5.360819739786165</PinX>
						<PinY Unit="MM">5.699008843254562</PinY>
					</XForm>
				</Shape>
				<Shape ID="33" UniqueID="{F5C0973F-DA76-4DD2-9779-075B6C0CCB7F}" Name="Class.33" NameU="Class.33" Master="22">
					<XForm>
						<PinX Unit="MM">2.263779527559055</PinX>
						<PinY Unit="MM">7.401574803149606</PinY>
					</XForm>
				</Shape>
				<Shape ID="40" UniqueID="{EBEFD15D-911B-46E4-B2B2-21EFB35F8A90}" Name="Name" NameU="Name">
					<Text>ATL::IServiceProviderImpl</Text>
					<XForm>
						<PinX Unit="MM">2.263779527559055</PinX>
						<PinY Unit="MM">7.576771653543307</PinY>
					</XForm>
				</Shape>
				<Shape ID="41" UniqueID="{70DB0D47-488F-4BD1-B958-88862B503229}" Name="Parameters" NameU="Parameters">
					<Text>T</Text>
					<XForm>
						<PinX Unit="MM">2.983816768998725</PinX>
						<PinY Unit="MM">7.775210659947566</PinY>
					</XForm>
				</Shape>
				<Shape ID="42" UniqueID="{C7A8D1CC-FECA-4CF7-817E-E8877FECBA27}" Name="Generalization.42" NameU="Generalization.42" Master="24">
					<XForm>
						<PinX Unit="MM">3.318114562104816</PinX>
						<PinY Unit="MM">5.718693882624642</PinY>
					</XForm>
				</Shape>
				<Shape ID="44" UniqueID="{C385C70C-D4DB-4ED0-BC43-3FA976045FE7}" Name="Class.44" NameU="Class.44" Master="22">
					<XForm>
						<PinX Unit="MM">4.307813022261040</PinX>
						<PinY Unit="MM">2.165354330708662</PinY>
					</XForm>
				</Shape>
				<Shape ID="51" UniqueID="{69412662-2C67-4328-85E0-42DBA773B9D0}" Name="Name" NameU="Name">
					<Text>LocalServiceProvider</Text>
					<XForm>
						<PinX Unit="MM">4.307813022261040</PinX>
						<PinY Unit="MM">2.340551181102363</PinY>
					</XForm>
				</Shape>
				<Shape ID="53" UniqueID="{75F35F7D-773D-432D-87FA-0FCAE2DF7D86}" Name="Generalization.53" NameU="Generalization.53" Master="24">
					<XForm>
						<PinX Unit="MM">3.135110065593831</PinX>
						<PinY Unit="MM">4.734441914120705</PinY>
					</XForm>
				</Shape>
				<Shape ID="55" UniqueID="{472DE8D9-0D45-4A4D-AEA9-163CE1E34B41}" Name="Binary Association" NameU="Binary Association" Master="30">
					<XForm>
						<PinX Unit="MM">4.309418322154142</PinX>
						<PinY Unit="MM">3.149606299212598</PinY>
					</XForm>
				</Shape>
				<Shape ID="57" UniqueID="{D86413E4-A6CB-4497-8EC9-6ADA3BB22DB9}" Name="end1_mp" NameU="end1_mp">
					<Text>1</Text>
					<XForm>
						<PinX Unit="IN">4.240312943928590</PinX>
						<PinY Unit="IN">3.744941035383822</PinY>
					</XForm>
				</Shape>
				<Shape ID="59" UniqueID="{5838F869-7D2A-4C0B-A39B-D07CC2177E0E}" Name="end2_mp" NameU="end2_mp">
					<Text>1</Text>
					<XForm>
						<PinX Unit="IN">4.237102344142385</PinX>
						<PinY Unit="IN">2.554271563041377</PinY>
					</XForm>
				</Shape>
				<Shape ID="60" UniqueID="{380D18CA-5680-4536-93FD-3A3B8D2E0E1A}" Name="Generalization.60" NameU="Generalization.60" Master="24">
					<XForm>
						<PinX Unit="MM">5.542781696824688</PinX>
						<PinY Unit="MM">4.714756874750626</PinY>
					</XForm>
				</Shape>
				<Shape ID="62" UniqueID="{27280C96-74D5-4B66-9A1C-673ED3D6F974}" Name="Interface" NameU="Interface" Master="23">
					<Text>IServiceProvider</Text>
					<XForm>
						<PinX Unit="MM">1.399992286119385</PinX>
						<PinY Unit="MM">7.401574803149606</PinY>
					</XForm>
				</Shape>
				<Shape ID="63" UniqueID="{8959DE1C-A82F-4A03-8E82-19393AA972BF}" Name="Interface.63" NameU="Interface.63" Master="23">
					<Text>ISupportErrorInfo</Text>
					<XForm>
						<PinX Unit="MM">5.581989209851392</PinX>
						<PinY Unit="MM">7.362204724409448</PinY>
					</XForm>
				</Shape>
				<Shape ID="64" UniqueID="{343232C5-9F01-48FF-9A65-D3CB158BD764}" Name="Interface.64" NameU="Interface.64" Master="23">
					<Text>IGlobalService</Text>
					<XForm>
						<PinX Unit="MM">3.346456692913386</PinX>
						<PinY Unit="MM">4.133858267716535</PinY>
					</XForm>
				</Shape>
				<Shape ID="65" UniqueID="{6CA00701-3994-4F82-9E44-3BB08426CE42}" Name="Interface.65" NameU="Interface.65" Master="23">
					<Text>ILocalService</Text>
					<XForm>
						<PinX Unit="MM">3.561318184996174</PinX>
						<PinY Unit="MM">2.165354330708662</PinY>
					</XForm>
				</Shape>
			</Shapes>
		</Page>
		<Page ID="4" Name="Service Consumption" NameU="Service Consumption">
			<Shapes>
				<Shape ID="1" UniqueID="{CF4E7634-7E3C-4262-8757-D299863F3518}" Name="Watermark Title" NameU="Watermark Title" Master="18">
					<Text>Static Structure</Text>
					<XForm>
						<PinX Unit="MM">0.000000000000000</PinX>
						<PinY Unit="MM">10.999999999999998</PinY>
					</XForm>
				</Shape>
				<Shape ID="2" UniqueID="{B07A143C-CCEB-44C7-8AAC-706B0EDA3CCD}" Name="Class" NameU="Class" Master="22">
					<XForm>
						<PinX Unit="MM">3.956692913385826</PinX>
						<PinY Unit="MM">6.889763779527558</PinY>
					</XForm>
				</Shape>
				<Shape ID="9" UniqueID="{34734AA9-91C0-4EFC-B7C3-DC38E1597F30}" Name="Name" NameU="Name">
					<Text>ServiceProviderPackage</Text>
					<XForm>
						<PinX Unit="MM">3.956692913385826</PinX>
						<PinY Unit="MM">7.064960629921258</PinY>
					</XForm>
				</Shape>
				<Shape ID="11" UniqueID="{FF041979-6C3C-4D2B-B28A-08D53816E205}" Name="Interface" NameU="Interface" Master="23">
					<Text>IGlobalService</Text>
					<XForm>
						<PinX Unit="MM">3.129822404734242</PinX>
						<PinY Unit="MM">6.889763779527558</PinY>
					</XForm>
				</Shape>
				<Shape ID="12" UniqueID="{9D005F5F-529D-4243-90AD-20ADB102DFB0}" Name="Class.12" NameU="Class.12" Master="22">
					<XForm>
						<PinX Unit="MM">3.956692913385826</PinX>
						<PinY Unit="MM">4.921259842519684</PinY>
					</XForm>
				</Shape>
				<Shape ID="19" UniqueID="{B6E24622-630D-4325-8E24-04D7B3A571C7}" Name="Name" NameU="Name">
					<Text>ServiceConsumerPackage</Text>
					<XForm>
						<PinX Unit="MM">3.956692913385826</PinX>
						<PinY Unit="MM">5.096456692913384</PinY>
					</XForm>
				</Shape>
				<Shape ID="21" UniqueID="{33C08CC7-2AF8-4625-A3ED-F069547B5CE0}" Name="Usage" NameU="Usage" Master="28">
					<Text>«uses»</Text>
					<XForm>
						<PinX Unit="MM">3.288265800940107</PinX>
						<PinY Unit="MM">6.043307086614172</PinY>
					</XForm>
				</Shape>
			</Shapes>
		</Page>
	</Pages>
</VisioDocument>