<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets  xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
	<CodeSnippet Format="1.0.0">
		<Header>
			<Title>Dispose pattern</Title>
			<Shortcut>dispose</Shortcut>
			<Description>Code snippet for the dispose pattern</Description>
			<Author>Fons Sonnemans</Author>
			<SnippetTypes>
				<SnippetType>Expansion</SnippetType>
			</SnippetTypes>
		</Header>
		<Snippet>
			<Declarations>
				<Literal Editable="false">
					<ID>classname</ID>
					<ToolTip>Class name</ToolTip>
					<Function>ClassName()</Function>
					<Default>ClassNamePlaceholder</Default>
				</Literal>
			</Declarations>
			<Code Language="csharp">
        <![CDATA[~$classname$() {
            this.Dispose(false);
        }

        public void Dispose() {
            this.Dispose(true);
            GC.SuppressFinalize(this);  // Finalization is now unnecessary
        }

        protected virtual void Dispose(bool disposing) {
            if (disposing) {
                // Free managed resources
            }
            // Free unmanaged resources
        }
      ]]>
			</Code>
		</Snippet>
	</CodeSnippet>
</CodeSnippets>