Interface ICsDelegate
Model definition of a delegate in C#.
Inherited Members
Namespace: CodeFactory.DotNet.CSharp
Assembly: CodeFactory.DotNet.dll
Syntax
public interface ICsDelegate : ICsModel, ICsAttributes, ICsGeneric, IDotNetDelegate, IDotNetModel, IModelStatus, IDotNetAttributes, IDotNetGeneric, IDocumentation, ILookup, ISourceFiles, IParent, IParent
Properties
| Improve this Doc View SourceBeginInvokeMethod
The begin invoke method definition for this delegate.
Declaration
CsMethod BeginInvokeMethod { get; }
Property Value
Type | Description |
---|---|
CsMethod |
EndInvokeMethod
The end invoke method definition for this delegate.
Declaration
CsMethod EndInvokeMethod { get; }
Property Value
Type | Description |
---|---|
CsMethod |
InvokeMethod
The invoke method definition for this delegate.
Declaration
CsMethod InvokeMethod { get; }
Property Value
Type | Description |
---|---|
CsMethod |
Parameters
List of the parameters that have been assigned to the delegate. If HasParameters property is set to false this will be an empty list.
Declaration
IReadOnlyList<CsParameter> Parameters { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<CsParameter> |
ReturnType
The type information about the return type assigned to the method.
Declaration
CsType ReturnType { get; }
Property Value
Type | Description |
---|---|
CsType |
Security
The security scope that has been assigned to this item.
Declaration
CsSecurity Security { get; }
Property Value
Type | Description |
---|---|
CsSecurity |
Methods
| Improve this Doc View SourceAddAfterAsync(string, string)
Adds the source code directly after the definition of the ICsDelegatein the target document.
Declaration
[Obsolete("No longer support will be removed in later edition, you no longer need to pass the source document.", false)]
Task<CsSource> AddAfterAsync(string sourceDocument, string sourceCode)
Parameters
Type | Name | Description |
---|---|---|
string | sourceDocument | The fully qualified path to the source code document to be updated. |
string | sourceCode | The source code that is to be added to the document. |
Returns
Type | Description |
---|---|
Task<CsSource> | A newly loaded copy of the ICsSource model after the changes have been applied. |
Exceptions
Type | Condition |
---|---|
DocumentException | Error is raised when errors occur updating the source document. |
AddAfterAsync(string)
Adds the source code directly after the definition of the ICsDelegatein the target document.
Declaration
Task<CsSource> AddAfterAsync(string sourceCode)
Parameters
Type | Name | Description |
---|---|---|
string | sourceCode | The source code that is to be added to the document. |
Returns
Type | Description |
---|---|
Task<CsSource> | A newly loaded copy of the ICsSource model after the changes have been applied. |
Exceptions
Type | Condition |
---|---|
DocumentException | Error is raised when errors occur updating the source document. |
AddBeforeAsync(string, bool)
Adds the source code directly before the definition of the ICsDelegatein the target document.
Declaration
Task<CsSource> AddBeforeAsync(string sourceCode, bool ignoreLeadingModelsAndDocs)
Parameters
Type | Name | Description |
---|---|---|
string | sourceCode | The source code that is to be added to the document. |
bool | ignoreLeadingModelsAndDocs | Changes the before entry point to the start of the delegate definition not before the documentation or attributes that are assigned. |
Returns
Type | Description |
---|---|
Task<CsSource> | A newly loaded copy of the ICsSource model after the changes have been applied. |
Exceptions
Type | Condition |
---|---|
DocumentException | Error is raised when errors occur updating the source document. |
AddBeforeAsync(string, string)
Adds the source code directly before the definition of the ICsDelegatein the target document.
Declaration
[Obsolete("No longer support will be removed in later edition, you no longer need to pass the source document.", false)]
Task<CsSource> AddBeforeAsync(string sourceDocument, string sourceCode)
Parameters
Type | Name | Description |
---|---|---|
string | sourceDocument | The fully qualified path to the source code document to be updated. |
string | sourceCode | The source code that is to be added to the document. |
Returns
Type | Description |
---|---|
Task<CsSource> | A newly loaded copy of the ICsSource model after the changes have been applied. |
Exceptions
Type | Condition |
---|---|
DocumentException | Error is raised when errors occur updating the source document. |
AddBeforeAsync(string)
Adds the source code directly before the definition of the ICsDelegatein the target document.
Declaration
Task<CsSource> AddBeforeAsync(string sourceCode)
Parameters
Type | Name | Description |
---|---|---|
string | sourceCode | The source code that is to be added to the document. |
Returns
Type | Description |
---|---|
Task<CsSource> | A newly loaded copy of the ICsSource model after the changes have been applied. |
Exceptions
Type | Condition |
---|---|
DocumentException | Error is raised when errors occur updating the source document. |
DeleteAsync()
Deletes the definition of the delegate from the source document.
Declaration
Task<CsSource> DeleteAsync()
Returns
Type | Description |
---|---|
Task<CsSource> | A newly loaded copy of the ICsSource model after the delegate has been removed from the document. |
Exceptions
Type | Condition |
---|---|
DocumentException | Error is raised when errors occur updating the source document. |
DeleteAsync(string)
Deletes the definition of the delegate from the source document.
Declaration
[Obsolete("No longer support will be removed in later edition, you no longer need to pass the source document.", false)]
Task<CsSource> DeleteAsync(string sourceDocument)
Parameters
Type | Name | Description |
---|---|---|
string | sourceDocument | The source document that the delegate is to be removed from. |
Returns
Type | Description |
---|---|
Task<CsSource> | A newly loaded copy of the ICsSource model after the delegate has been removed from the document. |
Exceptions
Type | Condition |
---|---|
DocumentException | Error is raised when errors occur updating the source document. |
GetSourceLocationAsync()
Gets the starting and ending locations within the document where the delegate is located.
Declaration
Task<ISourceLocation> GetSourceLocationAsync()
Returns
Type | Description |
---|---|
Task<ISourceLocation> | The source location for the delegate. |
Exceptions
Type | Condition |
---|---|
DocumentException | Raised when an error occurs getting the location from the document. |
GetSourceLocationAsync(string)
Gets the starting and ending locations within the document where the delegate is located.
Declaration
[Obsolete("No longer support will be removed in later edition, you no longer need to pass the source document.", false)]
Task<ISourceLocation> GetSourceLocationAsync(string sourceDocument)
Parameters
Type | Name | Description |
---|---|---|
string | sourceDocument | The fully qualified path to the document that has the delegate defined in. |
Returns
Type | Description |
---|---|
Task<ISourceLocation> | The source location for the delegate. |
Exceptions
Type | Condition |
---|---|
DocumentException | Raised when an error occurs getting the location from the document. |
ReplaceAsync(string, string)
Replaces the current delegate with the provided source code.
Declaration
[Obsolete("No longer support will be removed in later edition, you no longer need to pass the source document.", false)]
Task<CsSource> ReplaceAsync(string sourceDocument, string sourceCode)
Parameters
Type | Name | Description |
---|---|---|
string | sourceDocument | The fully qualified path to the source code document to be updated. |
string | sourceCode | The source code that is to be used to replace the original definition in the document. |
Returns
Type | Description |
---|---|
Task<CsSource> | A newly loaded copy of the ICsSource model after the changes have been applied. |
Exceptions
Type | Condition |
---|---|
DocumentException | Error is raised when errors occur updating the source document. |
ReplaceAsync(string)
Replaces the current delegate with the provided source code.
Declaration
Task<CsSource> ReplaceAsync(string sourceCode)
Parameters
Type | Name | Description |
---|---|---|
string | sourceCode | The source code that is to be used to replace the original definition in the document. |
Returns
Type | Description |
---|---|
Task<CsSource> | A newly loaded copy of the ICsSource model after the changes have been applied. |
Exceptions
Type | Condition |
---|---|
DocumentException | Error is raised when errors occur updating the source document. |