Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/tools/HL3Snippets/HL3.OperatorStub.snippet @ 5304

Last change on this file since 5304 was 4761, checked in by abeham, 14 years ago

#567

  • Added snippets to source control
File size: 2.0 KB
Line 
1<?xml version="1.0" encoding="utf-8"?>
2<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
3  <CodeSnippet Format="1.0.0">
4    <Header>
5      <Title>HL3.OperatorStub</Title>
6      <Author>Andreas Beham</Author>
7      <Description>Creates an operator class</Description>
8      <HelpUrl>https://dev.heuristiclab.com/trac/hl/core/wiki/DevelopersCodeSnippets</HelpUrl>
9      <SnippetTypes>
10        <SnippetType>Expansion</SnippetType>
11      </SnippetTypes>
12      <Keywords />
13      <Shortcut>hl3OperatorClass</Shortcut>
14    </Header>
15    <Snippet>
16      <References />
17      <Imports />
18      <Declarations>
19        <Literal Editable="true">
20          <ID>OperatorName</ID>
21          <Type></Type>
22          <ToolTip></ToolTip>
23          <Default>MyOperator</Default>
24          <Function></Function>
25        </Literal>
26        <Literal Editable="true">
27          <ID>BaseClass</ID>
28          <Type></Type>
29          <ToolTip>Most operators derive from SingleSuccessorOperator</ToolTip>
30          <Default>SingleSuccessorOperator</Default>
31          <Function></Function>
32        </Literal>
33        <Literal Editable="true">
34          <ID>OperatorDescription</ID>
35          <Type></Type>
36          <ToolTip>It is always advised to add a good description of your operator</ToolTip>
37          <Default>Description missing</Default>
38          <Function></Function>
39        </Literal>
40      </Declarations>
41      <Code Language="csharp" Kind="" Delimiter="$"><![CDATA[[Item("$OperatorName$", "$OperatorDescription$")]
42[StorableClass]
43public class $OperatorName$ : $BaseClass$ {
44
45  #region Parameter Properties
46  #endregion
47
48  [StorableConstructor]
49  protected $OperatorName$(bool deserializing) : base(deserializing) { }
50  public $OperatorName$()
51    : base() {
52    // TODO: Add new parameters here
53  }
54
55    public override IOperation Apply() {
56      // TODO: Add your code here
57      return base.Apply(scope);
58    }
59}]]></Code>
60    </Snippet>
61  </CodeSnippet>
62</CodeSnippets>
Note: See TracBrowser for help on using the repository browser.