-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathICsSource.cs
More file actions
94 lines (79 loc) · 4.03 KB
/
ICsSource.cs
File metadata and controls
94 lines (79 loc) · 4.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
//*****************************************************************************
//* Code Factory SDK
//* Copyright (c) 2020-2023 CodeFactory, LLC
//*****************************************************************************
using System.Collections.Generic;
using System.Threading.Tasks;
using CodeFactory.Document;
namespace CodeFactory.DotNet.CSharp
{
/// <summary>
/// Source definition from a source that was written in C#.
/// </summary>
public interface ICsSource : ICsModel, IDotNetSource, IParent
{
/// <summary>
/// The namespaces that are used as references to access other libraries not hosted in the source document.
/// </summary>
new IReadOnlyList<CsUsingStatement> NamespaceReferences { get; }
/// <summary>
/// The interfaces that were defined in the source.
/// </summary>
new IReadOnlyList<CsInterface> Interfaces { get; }
/// <summary>
/// The classes that were defined in the source.
/// </summary>
new IReadOnlyList<CsClass> Classes { get; }
/// <summary>
/// The structures that were defined in the source.
/// </summary>
new IReadOnlyList<CsStructure> Structures { get; }
/// <summary>
/// The records that were defined in the source.
/// </summary>
IReadOnlyList<CsRecord> Records { get; }
/// <summary>
/// The record structures that were defined in the source.
/// </summary>
IReadOnlyList<CsRecordStructure> RecordStructures { get; }
/// <summary>
/// The delegates that were defined in the source.
/// </summary>
new IReadOnlyList<CsDelegate> Delegates { get; }
/// <summary>
/// The enumerations that were defined in the source.
/// </summary>
new IReadOnlyList<CsEnum> Enums { get; }
/// <summary>
/// The namespaces that were defined in the source.
/// </summary>
new IReadOnlyList<CsNamespace> Namespaces { get; }
/// <summary>
/// Adds the source code to the beginning of the <see cref="ICsSource"/> model.
/// </summary>
/// <param name="sourceCode">The source code that is to be added to the document.</param>
/// <returns>A newly loaded copy of the <see cref="ICsSource"/> model after the changes have been applied.</returns>
/// <exception cref="DocumentException">Error is raised when errors occur updating the source document.</exception>
Task<CsSource> AddToBeginningAsync(string sourceCode);
/// <summary>
/// Adds the source code the end of the <see cref="ICsSource"/> model.
/// </summary>
/// <param name="sourceCode">The source code that is to be added to the document.</param>
/// <returns>A newly loaded copy of the <see cref="ICsSource"/> model after the changes have been applied.</returns>
/// <exception cref="DocumentException">Error is raised when errors occur updating the source document.</exception>
Task<CsSource> AddToEndAsync(string sourceCode);
/// <summary>
/// Deletes the content from the <see cref="ICsSource"/> model.
/// </summary>
/// <returns>A newly loaded copy of the <see cref="ICsSource"/> model after the delegate has been removed from the document.</returns>
/// <exception cref="DocumentException">Error is raised when errors occur updating the source document.</exception>
Task<CsSource> DeleteAsync();
/// <summary>
/// Replaces the content of the <see cref="ICsSource"/> model.
/// </summary>
/// <param name="sourceCode">The source code that is to be used to replace the original definition in the document.</param>
/// <returns>A newly loaded copy of the <see cref="ICsSource"/> model after the changes have been applied.</returns>
/// <exception cref="DocumentException">Error is raised when errors occur updating the source document.</exception>
Task<CsSource> ReplaceAsync(string sourceCode);
}
}