You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`IDisposable`is not implemented correctly. Some reasons for this problem are listed here:
33
+
The <xref:System.IDisposable?displayProperty=nameWithType> interface is not implemented correctly. Possible reasons for this include:
32
34
33
-
- IDisposable is re-implemented in the class.
35
+
-<xref:System.IDisposable> is reimplemented in the class.
34
36
35
-
- Finalize is re-overridden.
37
+
- Finalize is reoverridden.
36
38
37
-
- Dispose is overridden.
39
+
- Dispose() is overridden.
38
40
39
-
- Dispose() is not public, sealed, or named Dispose.
41
+
-The Dispose() method is not public, [sealed](/dotnet/csharp/language-reference/keywords/sealed), or named **Dispose**.
40
42
41
43
- Dispose(bool) is not protected, virtual, or unsealed.
42
44
43
45
- In unsealed types, Dispose() must call Dispose(true).
44
46
45
-
- For unsealed types, the Finalize implementation does not call either or both Dispose(bool) or the case class finalizer.
47
+
- For unsealed types, the Finalize implementation does not call either or both Dispose(bool) or the base class finalizer.
46
48
47
-
Violation of any one of these patterns will trigger this warning.
49
+
Violation of any one of these patterns triggers warning CA1063.
48
50
49
-
Every unsealed type that declares and implements the IDisposable interface must provide its own protected virtual void Dispose(bool) method. Dispose() should call Dipose(true) and Finalize should call Dispose(false). If you are creating an unsealed type that declares and implements the IDisposable interface, you must define Dispose(bool) and call it. For more information, see [Cleaning up unmanaged resources](/dotnet/standard/garbage-collection/unmanaged)in the [.NET Framework design guidelines](/dotnet/standard/design-guidelines/index).
51
+
Every unsealed type that declares and implements the <xref:System.IDisposable> interface must provide its own protected virtual void Dispose(bool) method. Dispose() should call Dipose(true), and the finalizer should call Dispose(false). If you create an unsealed type that declares and implements the <xref:System.IDisposable> interface, you must define Dispose(bool) and call it. For more information, see [Clean up unmanaged resources (.NET guide)](/dotnet/standard/garbage-collection/unmanaged)and [Dispose pattern](/dotnet/standard/design-guidelines/dispose-pattern).
50
52
51
53
## Rule description
52
54
53
-
All IDisposable types should implement the Dispose pattern correctly.
55
+
All <xref:System.IDisposable> types should implement the [Dispose pattern](/dotnet/standard/design-guidelines/dispose-pattern) correctly.
54
56
55
57
## How to fix violations
56
58
57
-
Examine your code and determine which of the following resolutions will fix this violation.
59
+
Examine your code and determine which of the following resolutions will fix this violation:
58
60
59
-
- Remove IDisposable from the list of interfaces that are implemented by {0} and override the base class Dispose implementation instead.
61
+
- Remove <xref:System.IDisposable> from the list of interfaces that are implemented by your type, and override the base class Dispose implementation instead.
60
62
61
-
- Remove the finalizer from type {0}, override Dispose(bool disposing), and put the finalization logic in the code path where 'disposing' is false.
63
+
- Remove the finalizer from your type, override Dispose(bool disposing), and put the finalization logic in the code path where 'disposing' is false.
62
64
63
-
-Remove {0}, override Dispose(bool disposing), and put the dispose logic in the code path where 'disposing' is true.
65
+
-Override Dispose(bool disposing), and put the dispose logic in the code path where 'disposing' is true.
64
66
65
-
-Ensure that {0} is declared as public and sealed.
67
+
-Make sure that Dispose() is declared as public and [sealed](/dotnet/csharp/language-reference/keywords/sealed).
66
68
67
-
- Rename {0} to 'Dispose' and make sure that it is declared as public and sealed.
69
+
- Rename your dispose method to **Dispose** and make sure that it's declared as public and [sealed](/dotnet/csharp/language-reference/keywords/sealed).
68
70
69
-
- Make sure that {0} is declared as protected, virtual, and unsealed.
71
+
- Make sure that Dispose(bool) is declared as protected, virtual, and unsealed.
70
72
71
-
- Modify {0} so that it calls Dispose(true), then calls GC.SuppressFinalize on the current object instance ('this' or 'Me' in [!INCLUDE[vbprvb](../code-quality/includes/vbprvb_md.md)]), and then returns.
73
+
- Modify Dispose() so that it calls Dispose(true), then calls <xref:System.GC.SuppressFinalize%2A> on the current object instance (`this`, or `Me` in Visual Basic), and then returns.
72
74
73
-
- Modify {0} so that it calls Dispose(false) and then returns.
75
+
- Modify your finalizer so that it calls Dispose(false) and then returns.
74
76
75
-
- If you are creating an unsealed type that declares and implements the IDisposable interface, make sure that the implementation of IDisposable follows the pattern that is described earlier in this section.
77
+
- If you create an unsealed type that declares and implements the <xref:System.IDisposable> interface, make sure that the implementation of <xref:System.IDisposable> follows the pattern that is described earlier in this section.
76
78
77
79
## When to suppress warnings
78
80
@@ -96,7 +98,7 @@ public class Resource : IDisposable
96
98
}
97
99
98
100
// NOTE: Leave out the finalizer altogether if this class doesn't
99
-
// own unmanaged resources itself, but leave the other methods
101
+
// own unmanaged resources, but leave the other methods
100
102
// exactly as they are.
101
103
~Resource()
102
104
{
@@ -124,4 +126,9 @@ public class Resource : IDisposable
Copy file name to clipboardExpand all lines: docs/designers/shader-designer-nodes.md
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -11,11 +11,11 @@ manager: douge
11
11
ms.workload:
12
12
- "multiple"
13
13
---
14
-
# Shader Designer Nodes
14
+
# Shader Designer nodes
15
15
The articles in this section of the documentation contain information about the various Shader Designer nodes that you can use to create graphics effects.
16
16
17
17
## Nodes and node types
18
-
The Shader Designer represents visual effects as a graph. These graphs are built from nodes that are specifically chosen and connected in precise ways to achieve the intended affect. Each node represents either a piece of information or a mathematical function, and the connections between them represent how the information flows through the graph to produce the result. The Shader Designer provides six different node types—filters, texture nodes, parameters, constants, utility nodes, and math nodes—and several individual nodes belong to each type. These nodes and node types are described in the other articles in this section—see the links at the end of this document.
18
+
The Shader Designer represents visual effects as a graph. These graphs are built from nodes that are specifically chosen and connected in precise ways to achieve the intended effect. Each node represents either a piece of information or a mathematical function, and the connections between them represent how the information flows through the graph to produce the result. The Shader Designer provides six different node types—filters, texture nodes, parameters, constants, utility nodes, and math nodes—and several individual nodes belong to each type. These nodes and node types are described in the other articles in this section. For more information, see the links at the end of this document.
19
19
20
20
## Node structure
21
21
All nodes are made up of a combination of common elements. Every node has at least one output terminal on its right-hand side (except the final color node, which represents the output of the shader). Nodes that represent calculations or texture samplers have input terminals on their left-hand sides, but nodes that represent information have no input terminals. Output terminals are connected to input terminals to move information from one node to another.
@@ -39,9 +39,9 @@ The articles in this section of the documentation contain information about the
39
39
40
40
|Title|Description|
41
41
|-----------|-----------------|
42
-
|[Constant Nodes](../designers/constant-nodes.md)|Describes nodes that you can use to represent literal values and interpolated vertex-state information in shader calculations. Because vertex-state is interpolated—and therefore, is different for each pixel—each pixel-shader instance receives a different version of the constant.|
43
-
|[Parameter Nodes](../designers/parameter-nodes.md)|Describes nodes that you can use to represent camera position, material properties, lighting parameters, time, and other app-state information in shader calculations.|
44
-
|[Texture Nodes](../designers/texture-nodes.md)|Describes the nodes that you can use to sample various texture types and geometries, and to produce or transform texture coordinates in common ways.|
45
-
|[Math Nodes](../designers/math-nodes.md)|Describes the nodes that you can use to perform algebraic, logic, trigonometric, and other mathematical operations that map directly to HLSL instructions.|
46
-
|[Utility Nodes](../designers/utility-nodes.md)|Describes the nodes that you can use to perform common lighting calculations and other common operations that do not map directly to HLSL instructions.|
47
-
|[Filter Nodes](../designers/filter-nodes.md)|Describes the nodes that you can use to perform texture filtering and color filtering.|
42
+
|[Constant nodes](../designers/constant-nodes.md)|Describes nodes that you can use to represent literal values and interpolated vertex-state information in shader calculations. Because vertex-state is interpolated—and therefore, is different for each pixel—each pixel-shader instance receives a different version of the constant.|
43
+
|[Parameter nodes](../designers/parameter-nodes.md)|Describes nodes that you can use to represent camera position, material properties, lighting parameters, time, and other app-state information in shader calculations.|
44
+
|[Texture nodes](../designers/texture-nodes.md)|Describes the nodes that you can use to sample various texture types and geometries, and to produce or transform texture coordinates in common ways.|
45
+
|[Math nodes](../designers/math-nodes.md)|Describes the nodes that you can use to perform algebraic, logic, trigonometric, and other mathematical operations that map directly to HLSL instructions.|
46
+
|[Utility nodes](../designers/utility-nodes.md)|Describes the nodes that you can use to perform common lighting calculations and other common operations that do not map directly to HLSL instructions.|
47
+
|[Filter nodes](../designers/filter-nodes.md)|Describes the nodes that you can use to perform texture filtering and color filtering.|
0 commit comments