Imported Upstream version 4.6.0.125

Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-08-03 10:59:49 +00:00
parent a569aebcfd
commit e79aa3c0ed
17047 changed files with 3137615 additions and 392334 deletions

View File

@@ -0,0 +1,54 @@
//------------------------------------------------------------------------------
// <copyright file="CodeArgumentReferenceExpression.cs" company="Microsoft">
//
// <OWNER>[....]</OWNER>
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
namespace System.CodeDom {
using System.Diagnostics;
using System;
using Microsoft.Win32;
using System.Collections;
using System.Runtime.InteropServices;
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
[
ClassInterface(ClassInterfaceType.AutoDispatch),
ComVisible(true),
Serializable,
]
public class CodeArgumentReferenceExpression : CodeExpression {
private string parameterName;
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public CodeArgumentReferenceExpression() {
}
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public CodeArgumentReferenceExpression(string parameterName) {
this.parameterName = parameterName;
}
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public string ParameterName {
get {
return (parameterName == null) ? string.Empty : parameterName;
}
set {
parameterName = value;
}
}
}
}

View File

@@ -0,0 +1,178 @@
//------------------------------------------------------------------------------
// <copyright file="CodeArrayCreateExpression.cs" company="Microsoft">
//
// <OWNER>[....]</OWNER>
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
namespace System.CodeDom {
using System.Diagnostics;
using System;
using Microsoft.Win32;
using System.Collections;
using System.Runtime.InteropServices;
/// <devdoc>
/// <para> Represents
/// an expression that creates an array.</para>
/// </devdoc>
[
ClassInterface(ClassInterfaceType.AutoDispatch),
ComVisible(true),
Serializable,
]
public class CodeArrayCreateExpression : CodeExpression {
private CodeTypeReference createType;
private CodeExpressionCollection initializers = new CodeExpressionCollection();
private CodeExpression sizeExpression;
private int size = 0;
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeArrayCreateExpression'/>.
/// </para>
/// </devdoc>
public CodeArrayCreateExpression() {
}
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeArrayCreateExpression'/> with the specified
/// array type and initializers.
/// </para>
/// </devdoc>
public CodeArrayCreateExpression(CodeTypeReference createType, params CodeExpression[] initializers) {
this.createType = createType;
this.initializers.AddRange(initializers);
}
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public CodeArrayCreateExpression(string createType, params CodeExpression[] initializers) {
this.createType = new CodeTypeReference(createType);
this.initializers.AddRange(initializers);
}
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public CodeArrayCreateExpression(Type createType, params CodeExpression[] initializers) {
this.createType = new CodeTypeReference(createType);
this.initializers.AddRange(initializers);
}
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeArrayCreateExpression'/>. with the specified array
/// type and size.
/// </para>
/// </devdoc>
public CodeArrayCreateExpression(CodeTypeReference createType, int size) {
this.createType = createType;
this.size = size;
}
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public CodeArrayCreateExpression(string createType, int size) {
this.createType = new CodeTypeReference(createType);
this.size = size;
}
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public CodeArrayCreateExpression(Type createType, int size) {
this.createType = new CodeTypeReference(createType);
this.size = size;
}
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeArrayCreateExpression'/>. with the specified array
/// type and size.
/// </para>
/// </devdoc>
public CodeArrayCreateExpression(CodeTypeReference createType, CodeExpression size) {
this.createType = createType;
this.sizeExpression = size;
}
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public CodeArrayCreateExpression(string createType, CodeExpression size) {
this.createType = new CodeTypeReference(createType);
this.sizeExpression = size;
}
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public CodeArrayCreateExpression(Type createType, CodeExpression size) {
this.createType = new CodeTypeReference(createType);
this.sizeExpression = size;
}
/// <devdoc>
/// <para>
/// Gets or sets
/// the type of the array to create.
/// </para>
/// </devdoc>
public CodeTypeReference CreateType {
get {
if (createType == null) {
createType = new CodeTypeReference("");
}
return createType;
}
set {
createType = value;
}
}
/// <devdoc>
/// <para>
/// Gets or sets
/// the initializers to initialize the array with.
/// </para>
/// </devdoc>
public CodeExpressionCollection Initializers {
get {
return initializers;
}
}
/// <devdoc>
/// <para>
/// Gets or sets
/// the size of the array.
/// </para>
/// </devdoc>
public int Size {
get {
return size;
}
set {
size = value;
}
}
/// <devdoc>
/// <para>Gets or sets the size of the array.</para>
/// </devdoc>
public CodeExpression SizeExpression {
get {
return sizeExpression;
}
set {
sizeExpression = value;
}
}
}
}

View File

@@ -0,0 +1,70 @@
//------------------------------------------------------------------------------
// <copyright file="CodeArrayIndexerExpression.cs" company="Microsoft">
//
// <OWNER>[....]</OWNER>
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
namespace System.CodeDom {
using System.Diagnostics;
using System;
using Microsoft.Win32;
using System.Collections;
using System.Runtime.InteropServices;
/// <devdoc>
/// <para>
/// Represents an array indexer expression.
/// </para>
/// </devdoc>
[
ClassInterface(ClassInterfaceType.AutoDispatch),
ComVisible(true),
Serializable,
]
public class CodeArrayIndexerExpression : CodeExpression {
private CodeExpression targetObject;
private CodeExpressionCollection indices;
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public CodeArrayIndexerExpression() {
}
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public CodeArrayIndexerExpression(CodeExpression targetObject, params CodeExpression[] indices) {
this.targetObject = targetObject;
this.indices = new CodeExpressionCollection();
this.indices.AddRange(indices);
}
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public CodeExpression TargetObject {
get {
return targetObject;
}
set {
targetObject = value;
}
}
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public CodeExpressionCollection Indices {
get {
if (indices == null) {
indices = new CodeExpressionCollection();
}
return indices;
}
}
}
}

View File

@@ -0,0 +1,80 @@
//------------------------------------------------------------------------------
// <copyright file="CodeAssignStatement.cs" company="Microsoft">
//
// <OWNER>[....]</OWNER>
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
namespace System.CodeDom {
using System.Diagnostics;
using System;
using Microsoft.Win32;
using System.Collections;
using System.Runtime.InteropServices;
/// <devdoc>
/// <para>
/// Represents a simple assignment statement.
/// </para>
/// </devdoc>
[
ClassInterface(ClassInterfaceType.AutoDispatch),
ComVisible(true),
Serializable,
]
public class CodeAssignStatement : CodeStatement {
private CodeExpression left;
private CodeExpression right;
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeAssignStatement'/>.
/// </para>
/// </devdoc>
public CodeAssignStatement() {
}
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeAssignStatement'/> that represents the
/// specified assignment values.
/// </para>
/// </devdoc>
public CodeAssignStatement(CodeExpression left, CodeExpression right) {
Left = left;
Right = right;
}
/// <devdoc>
/// <para>
/// Gets or sets
/// the variable to be assigned to.
/// </para>
/// </devdoc>
public CodeExpression Left {
get {
return left;
}
set {
left = value;
}
}
/// <devdoc>
/// <para>
/// Gets or sets
/// the value to assign.
/// </para>
/// </devdoc>
public CodeExpression Right {
get {
return right;
}
set {
right = value;
}
}
}
}

View File

@@ -0,0 +1,88 @@
//------------------------------------------------------------------------------
// <copyright file="CodeAttachEventStatement.cs" company="Microsoft">
//
// <OWNER>[....]</OWNER>
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
namespace System.CodeDom {
using System.Diagnostics;
using System;
using Microsoft.Win32;
using System.Collections;
using System.Runtime.InteropServices;
/// <devdoc>
/// <para>
/// Represents a event attach statement.
/// </para>
/// </devdoc>
[
ClassInterface(ClassInterfaceType.AutoDispatch),
ComVisible(true),
Serializable,
]
public class CodeAttachEventStatement : CodeStatement {
private CodeEventReferenceExpression eventRef;
private CodeExpression listener;
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeAttachEventStatement'/>.
/// </para>
/// </devdoc>
public CodeAttachEventStatement() {
}
/// <devdoc>
/// <para>
/// Initializes a new instance of the <see cref='System.CodeDom.CodeAttachEventStatement'/> class using the specified arguments.
/// </para>
/// </devdoc>
public CodeAttachEventStatement(CodeEventReferenceExpression eventRef, CodeExpression listener) {
this.eventRef = eventRef;
this.listener = listener;
}
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public CodeAttachEventStatement(CodeExpression targetObject, string eventName, CodeExpression listener) {
this.eventRef = new CodeEventReferenceExpression(targetObject, eventName);
this.listener = listener;
}
/// <devdoc>
/// <para>
/// The event to attach a listener to.
/// </para>
/// </devdoc>
public CodeEventReferenceExpression Event {
get {
if (eventRef == null) {
return new CodeEventReferenceExpression();
}
return eventRef;
}
set {
eventRef = value;
}
}
/// <devdoc>
/// <para>
/// The new listener.
/// </para>
/// </devdoc>
public CodeExpression Listener {
get {
return listener;
}
set {
listener = value;
}
}
}
}

View File

@@ -0,0 +1,87 @@
//------------------------------------------------------------------------------
// <copyright file="CodeAttributeArgument.cs" company="Microsoft">
//
// <OWNER>[....]</OWNER>
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
namespace System.CodeDom {
using System.Diagnostics;
using System;
using Microsoft.Win32;
using System.Collections;
using System.Runtime.InteropServices;
/// <devdoc>
/// <para>
/// Represents an argument for use in a custom attribute declaration.
/// </para>
/// </devdoc>
[
ClassInterface(ClassInterfaceType.AutoDispatch),
ComVisible(true),
Serializable,
]
public class CodeAttributeArgument {
private string name;
private CodeExpression value;
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeAttributeArgument'/>.
/// </para>
/// </devdoc>
public CodeAttributeArgument() {
}
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeAttributeArgument'/> using the specified value.
/// </para>
/// </devdoc>
public CodeAttributeArgument(CodeExpression value) {
Value = value;
}
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeAttributeArgument'/> using the specified name and
/// value.
/// </para>
/// </devdoc>
public CodeAttributeArgument(string name, CodeExpression value) {
Name = name;
Value = value;
}
/// <devdoc>
/// <para>
/// The name of the attribute.
/// </para>
/// </devdoc>
public string Name {
get {
return (name == null) ? string.Empty : name;
}
set {
name = value;
}
}
/// <devdoc>
/// <para>
/// The argument for the attribute.
/// </para>
/// </devdoc>
public CodeExpression Value {
get {
return value;
}
set {
this.value = value;
}
}
}
}

View File

@@ -0,0 +1,139 @@
// ------------------------------------------------------------------------------
// <copyright file="CodeAttributeArgumentCollection.cs" company="Microsoft">
//
// <OWNER>[....]</OWNER>
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
// ------------------------------------------------------------------------------
//
namespace System.CodeDom {
using System;
using System.Collections;
using System.Runtime.InteropServices;
/// <devdoc>
/// <para>
/// A collection that stores <see cref='System.CodeDom.CodeAttributeArgument'/> objects.
/// </para>
/// </devdoc>
[
ClassInterface(ClassInterfaceType.AutoDispatch),
ComVisible(true),
Serializable,
]
public class CodeAttributeArgumentCollection : CollectionBase {
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeAttributeArgumentCollection'/>.
/// </para>
/// </devdoc>
public CodeAttributeArgumentCollection() {
}
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeAttributeArgumentCollection'/> based on another <see cref='System.CodeDom.CodeAttributeArgumentCollection'/>.
/// </para>
/// </devdoc>
public CodeAttributeArgumentCollection(CodeAttributeArgumentCollection value) {
this.AddRange(value);
}
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeAttributeArgumentCollection'/> containing any array of <see cref='System.CodeDom.CodeAttributeArgument'/> objects.
/// </para>
/// </devdoc>
public CodeAttributeArgumentCollection(CodeAttributeArgument[] value) {
this.AddRange(value);
}
/// <devdoc>
/// <para>Represents the entry at the specified index of the <see cref='System.CodeDom.CodeAttributeArgument'/>.</para>
/// </devdoc>
public CodeAttributeArgument this[int index] {
get {
return ((CodeAttributeArgument)(List[index]));
}
set {
List[index] = value;
}
}
/// <devdoc>
/// <para>Adds a <see cref='System.CodeDom.CodeAttributeArgument'/> with the specified value to the
/// <see cref='System.CodeDom.CodeAttributeArgumentCollection'/> .</para>
/// </devdoc>
public int Add(CodeAttributeArgument value) {
return List.Add(value);
}
/// <devdoc>
/// <para>Copies the elements of an array to the end of the <see cref='System.CodeDom.CodeAttributeArgumentCollection'/>.</para>
/// </devdoc>
public void AddRange(CodeAttributeArgument[] value) {
if (value == null) {
throw new ArgumentNullException("value");
}
for (int i = 0; ((i) < (value.Length)); i = ((i) + (1))) {
this.Add(value[i]);
}
}
/// <devdoc>
/// <para>
/// Adds the contents of another <see cref='System.CodeDom.CodeAttributeArgumentCollection'/> to the end of the collection.
/// </para>
/// </devdoc>
public void AddRange(CodeAttributeArgumentCollection value) {
if (value == null) {
throw new ArgumentNullException("value");
}
int currentCount = value.Count;
for (int i = 0; i < currentCount; i = ((i) + (1))) {
this.Add(value[i]);
}
}
/// <devdoc>
/// <para>Gets a value indicating whether the
/// <see cref='System.CodeDom.CodeAttributeArgumentCollection'/> contains the specified <see cref='System.CodeDom.CodeAttributeArgument'/>.</para>
/// </devdoc>
public bool Contains(CodeAttributeArgument value) {
return List.Contains(value);
}
/// <devdoc>
/// <para>Copies the <see cref='System.CodeDom.CodeAttributeArgumentCollection'/> values to a one-dimensional <see cref='System.Array'/> instance at the
/// specified index.</para>
/// </devdoc>
public void CopyTo(CodeAttributeArgument[] array, int index) {
List.CopyTo(array, index);
}
/// <devdoc>
/// <para>Returns the index of a <see cref='System.CodeDom.CodeAttributeArgument'/> in
/// the <see cref='System.CodeDom.CodeAttributeArgumentCollection'/> .</para>
/// </devdoc>
public int IndexOf(CodeAttributeArgument value) {
return List.IndexOf(value);
}
/// <devdoc>
/// <para>Inserts a <see cref='System.CodeDom.CodeAttributeArgument'/> into the <see cref='System.CodeDom.CodeAttributeArgumentCollection'/> at the specified index.</para>
/// </devdoc>
public void Insert(int index, CodeAttributeArgument value) {
List.Insert(index, value);
}
/// <devdoc>
/// <para> Removes a specific <see cref='System.CodeDom.CodeAttributeArgument'/> from the
/// <see cref='System.CodeDom.CodeAttributeArgumentCollection'/> .</para>
/// </devdoc>
public void Remove(CodeAttributeArgument value) {
List.Remove(value);
}
}
}

View File

@@ -0,0 +1,108 @@
//------------------------------------------------------------------------------
// <copyright file="CodeAttributeDeclaration.cs" company="Microsoft">
//
// <OWNER>[....]</OWNER>
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
namespace System.CodeDom {
using System.Diagnostics;
using System;
using Microsoft.Win32;
using System.Collections;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
/// <devdoc>
/// <para>
/// Represents a single custom attribute.
/// </para>
/// </devdoc>
[
ClassInterface(ClassInterfaceType.AutoDispatch),
ComVisible(true),
Serializable,
]
public class CodeAttributeDeclaration {
private string name;
private CodeAttributeArgumentCollection arguments = new CodeAttributeArgumentCollection();
[OptionalField]
private CodeTypeReference attributeType;
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeAttributeDeclaration'/>.
/// </para>
/// </devdoc>
public CodeAttributeDeclaration() {
}
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeAttributeDeclaration'/> using the specified name.
/// </para>
/// </devdoc>
public CodeAttributeDeclaration(string name) {
Name = name;
}
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeAttributeDeclaration'/> using the specified
/// arguments.
/// </para>
/// </devdoc>
public CodeAttributeDeclaration(string name, params CodeAttributeArgument[] arguments) {
Name = name;
Arguments.AddRange(arguments);
}
public CodeAttributeDeclaration(CodeTypeReference attributeType) : this ( attributeType, null) {
}
public CodeAttributeDeclaration(CodeTypeReference attributeType, params CodeAttributeArgument[] arguments) {
this.attributeType = attributeType;
if( attributeType != null) {
this.name = attributeType.BaseType;
}
if(arguments != null) {
Arguments.AddRange(arguments);
}
}
/// <devdoc>
/// <para>
/// The name of the attribute being declared.
/// </para>
/// </devdoc>
public string Name {
get {
return (name == null) ? string.Empty : name;
}
set {
name = value;
attributeType = new CodeTypeReference(name);
}
}
/// <devdoc>
/// <para>
/// The arguments for the attribute.
/// </para>
/// </devdoc>
public CodeAttributeArgumentCollection Arguments {
get {
return arguments;
}
}
public CodeTypeReference AttributeType {
get {
return attributeType;
}
}
}
}

View File

@@ -0,0 +1,139 @@
// ------------------------------------------------------------------------------
// <copyright file="CodeAttributeDeclarationCollection.cs" company="Microsoft">
//
// <OWNER>[....]</OWNER>
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
// ------------------------------------------------------------------------------
//
namespace System.CodeDom {
using System;
using System.Collections;
using System.Runtime.InteropServices;
/// <devdoc>
/// <para>
/// A collection that stores <see cref='System.CodeDom.CodeAttributeDeclaration'/> objects.
/// </para>
/// </devdoc>
[
ClassInterface(ClassInterfaceType.AutoDispatch),
ComVisible(true),
Serializable,
]
public class CodeAttributeDeclarationCollection : CollectionBase {
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeAttributeDeclarationCollection'/>.
/// </para>
/// </devdoc>
public CodeAttributeDeclarationCollection() {
}
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeAttributeDeclarationCollection'/> based on another <see cref='System.CodeDom.CodeAttributeDeclarationCollection'/>.
/// </para>
/// </devdoc>
public CodeAttributeDeclarationCollection(CodeAttributeDeclarationCollection value) {
this.AddRange(value);
}
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeAttributeDeclarationCollection'/> containing any array of <see cref='System.CodeDom.CodeAttributeDeclaration'/> objects.
/// </para>
/// </devdoc>
public CodeAttributeDeclarationCollection(CodeAttributeDeclaration[] value) {
this.AddRange(value);
}
/// <devdoc>
/// <para>Represents the entry at the specified index of the <see cref='System.CodeDom.CodeAttributeDeclaration'/>.</para>
/// </devdoc>
public CodeAttributeDeclaration this[int index] {
get {
return ((CodeAttributeDeclaration)(List[index]));
}
set {
List[index] = value;
}
}
/// <devdoc>
/// <para>Adds a <see cref='System.CodeDom.CodeAttributeDeclaration'/> with the specified value to the
/// <see cref='System.CodeDom.CodeAttributeDeclarationCollection'/> .</para>
/// </devdoc>
public int Add(CodeAttributeDeclaration value) {
return List.Add(value);
}
/// <devdoc>
/// <para>Copies the elements of an array to the end of the <see cref='System.CodeDom.CodeAttributeDeclarationCollection'/>.</para>
/// </devdoc>
public void AddRange(CodeAttributeDeclaration[] value) {
if (value == null) {
throw new ArgumentNullException("value");
}
for (int i = 0; ((i) < (value.Length)); i = ((i) + (1))) {
this.Add(value[i]);
}
}
/// <devdoc>
/// <para>
/// Adds the contents of another <see cref='System.CodeDom.CodeAttributeDeclarationCollection'/> to the end of the collection.
/// </para>
/// </devdoc>
public void AddRange(CodeAttributeDeclarationCollection value) {
if (value == null) {
throw new ArgumentNullException("value");
}
int currentCount = value.Count;
for (int i = 0; i < currentCount; i = ((i) + (1))) {
this.Add(value[i]);
}
}
/// <devdoc>
/// <para>Gets a value indicating whether the
/// <see cref='System.CodeDom.CodeAttributeDeclarationCollection'/> contains the specified <see cref='System.CodeDom.CodeAttributeDeclaration'/>.</para>
/// </devdoc>
public bool Contains(CodeAttributeDeclaration value) {
return List.Contains(value);
}
/// <devdoc>
/// <para>Copies the <see cref='System.CodeDom.CodeAttributeDeclarationCollection'/> values to a one-dimensional <see cref='System.Array'/> instance at the
/// specified index.</para>
/// </devdoc>
public void CopyTo(CodeAttributeDeclaration[] array, int index) {
List.CopyTo(array, index);
}
/// <devdoc>
/// <para>Returns the index of a <see cref='System.CodeDom.CodeAttributeDeclaration'/> in
/// the <see cref='System.CodeDom.CodeAttributeDeclarationCollection'/> .</para>
/// </devdoc>
public int IndexOf(CodeAttributeDeclaration value) {
return List.IndexOf(value);
}
/// <devdoc>
/// <para>Inserts a <see cref='System.CodeDom.CodeAttributeDeclaration'/> into the <see cref='System.CodeDom.CodeAttributeDeclarationCollection'/> at the specified index.</para>
/// </devdoc>
public void Insert(int index, CodeAttributeDeclaration value) {
List.Insert(index, value);
}
/// <devdoc>
/// <para> Removes a specific <see cref='System.CodeDom.CodeAttributeDeclaration'/> from the
/// <see cref='System.CodeDom.CodeAttributeDeclarationCollection'/> .</para>
/// </devdoc>
public void Remove(CodeAttributeDeclaration value) {
List.Remove(value);
}
}
}

View File

@@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <copyright file="CodeBaseReferenceExpression.cs" company="Microsoft">
//
// <OWNER>petes</OWNER>
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
namespace System.CodeDom {
using System.Diagnostics;
using System;
using Microsoft.Win32;
using System.Collections;
using System.Runtime.InteropServices;
/// <devdoc>
/// <para>
/// Represents a reference to the base
/// class.
/// </para>
/// </devdoc>
[
ClassInterface(ClassInterfaceType.AutoDispatch),
ComVisible(true),
Serializable,
]
public class CodeBaseReferenceExpression : CodeExpression {
}
}

View File

@@ -0,0 +1,98 @@
//------------------------------------------------------------------------------
// <copyright file="CodeBinaryOperatorExpression.cs" company="Microsoft">
//
// <OWNER>[....]</OWNER>
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
namespace System.CodeDom {
using System.Diagnostics;
using System;
using Microsoft.Win32;
using System.Collections;
using System.Runtime.InteropServices;
/// <devdoc>
/// <para>
/// Represents a binary operator expression.
/// </para>
/// </devdoc>
[
ClassInterface(ClassInterfaceType.AutoDispatch),
ComVisible(true),
Serializable,
]
public class CodeBinaryOperatorExpression : CodeExpression {
private CodeBinaryOperatorType op;
private CodeExpression left;
private CodeExpression right;
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeBinaryOperatorExpression'/>.
/// </para>
/// </devdoc>
public CodeBinaryOperatorExpression() {
}
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeBinaryOperatorExpression'/>
/// using the specified
/// parameters.
/// </para>
/// </devdoc>
public CodeBinaryOperatorExpression(CodeExpression left, CodeBinaryOperatorType op, CodeExpression right) {
Right = right;
Operator = op;
Left = left;
}
/// <devdoc>
/// <para>
/// Gets or sets
/// the code expression on the right of the operator.
/// </para>
/// </devdoc>
public CodeExpression Right {
get {
return right;
}
set {
right = value;
}
}
/// <devdoc>
/// <para>
/// Gets or sets
/// the code expression on the left of the operator.
/// </para>
/// </devdoc>
public CodeExpression Left {
get {
return left;
}
set {
left = value;
}
}
/// <devdoc>
/// <para>
/// Gets or sets
/// the operator in the binary operator expression.
/// </para>
/// </devdoc>
public CodeBinaryOperatorType Operator {
get {
return op;
}
set {
op = value;
}
}
}
}

View File

@@ -0,0 +1,131 @@
//------------------------------------------------------------------------------
// <copyright file="CodeBinaryOperatorType.cs" company="Microsoft">
//
// <OWNER>petes</OWNER>
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
namespace System.CodeDom {
using System.Runtime.Remoting;
using System.Diagnostics;
using System;
using Microsoft.Win32;
using System.Collections;
using System.Runtime.InteropServices;
/// <devdoc>
/// <para>
/// Specifies type identifiers for supported binary operators.
/// </para>
/// </devdoc>
[
ComVisible(true),
Serializable,
]
public enum CodeBinaryOperatorType {
/// <devdoc>
/// <para>
/// Addition operator.
/// </para>
/// </devdoc>
Add,
/// <devdoc>
/// <para>
/// Subtraction operator.
/// </para>
/// </devdoc>
Subtract,
/// <devdoc>
/// <para>
/// Multiplication operator.
/// </para>
/// </devdoc>
Multiply,
/// <devdoc>
/// <para>
/// Division operator.
/// </para>
/// </devdoc>
Divide,
/// <devdoc>
/// <para>
/// Modulus operator.
/// </para>
/// </devdoc>
Modulus,
/// <devdoc>
/// <para>
/// Assignment operator.
/// </para>
/// </devdoc>
Assign,
/// <devdoc>
/// <para>
/// Identity not equal operator.
/// </para>
/// </devdoc>
IdentityInequality,
/// <devdoc>
/// <para>
/// Identity equal operator.
/// </para>
/// </devdoc>
IdentityEquality,
/// <devdoc>
/// <para>
/// Value equal operator.
/// </para>
/// </devdoc>
ValueEquality,
/// <devdoc>
/// <para>
/// Bitwise or operator.
/// </para>
/// </devdoc>
BitwiseOr,
/// <devdoc>
/// <para>
/// Bitwise and operator.
/// </para>
/// </devdoc>
BitwiseAnd,
/// <devdoc>
/// <para>
/// Boolean or operator.
/// </para>
/// </devdoc>
BooleanOr,
/// <devdoc>
/// <para>
/// Boolean and operator.
/// </para>
/// </devdoc>
BooleanAnd,
/// <devdoc>
/// <para>
/// Less than operator.
/// </para>
/// </devdoc>
LessThan,
/// <devdoc>
/// <para>
/// Less than or equal operator.
/// </para>
/// </devdoc>
LessThanOrEqual,
/// <devdoc>
/// <para>
/// Greater than operator.
/// </para>
/// </devdoc>
GreaterThan,
/// <devdoc>
/// <para>
/// Greater that or operator.
/// </para>
/// </devdoc>
GreaterThanOrEqual,
}
}

View File

@@ -0,0 +1,98 @@
//------------------------------------------------------------------------------
// <copyright file="CodeCastExpression.cs" company="Microsoft">
//
// <OWNER>[....]</OWNER>
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
namespace System.CodeDom {
using System.Diagnostics;
using System;
using Microsoft.Win32;
using System.Collections;
using System.Runtime.InteropServices;
/// <devdoc>
/// <para>
/// Represents a
/// type cast expression.
/// </para>
/// </devdoc>
[
ClassInterface(ClassInterfaceType.AutoDispatch),
ComVisible(true),
Serializable,
]
public class CodeCastExpression : CodeExpression {
private CodeTypeReference targetType;
private CodeExpression expression;
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeCastExpression'/>.
/// </para>
/// </devdoc>
public CodeCastExpression() {
}
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeCastExpression'/> using the specified
/// parameters.
/// </para>
/// </devdoc>
public CodeCastExpression(CodeTypeReference targetType, CodeExpression expression) {
TargetType = targetType;
Expression = expression;
}
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public CodeCastExpression(string targetType, CodeExpression expression) {
TargetType = new CodeTypeReference(targetType);
Expression = expression;
}
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public CodeCastExpression(Type targetType, CodeExpression expression) {
TargetType = new CodeTypeReference(targetType);
Expression = expression;
}
/// <devdoc>
/// <para>
/// The target type of the cast.
/// </para>
/// </devdoc>
public CodeTypeReference TargetType {
get {
if (targetType == null) {
targetType = new CodeTypeReference("");
}
return targetType;
}
set {
targetType = value;
}
}
/// <devdoc>
/// <para>
/// The expression to cast.
/// </para>
/// </devdoc>
public CodeExpression Expression {
get {
return expression;
}
set {
expression = value;
}
}
}
}

View File

@@ -0,0 +1,103 @@
//------------------------------------------------------------------------------
// <copyright file="CodeCatchClause.cs" company="Microsoft">
//
// <OWNER>[....]</OWNER>
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
namespace System.CodeDom {
using System.Diagnostics;
using System;
using Microsoft.Win32;
using System.Collections;
using System.Runtime.InteropServices;
/// <devdoc>
/// <para>Represents a catch exception block.</para>
/// </devdoc>
[
ClassInterface(ClassInterfaceType.AutoDispatch),
ComVisible(true),
Serializable,
]
public class CodeCatchClause {
private CodeStatementCollection statements;
private CodeTypeReference catchExceptionType;
private string localName;
/// <devdoc>
/// <para>
/// Initializes an instance of <see cref='System.CodeDom.CodeCatchClause'/>.
/// </para>
/// </devdoc>
public CodeCatchClause() {
}
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public CodeCatchClause(string localName) {
this.localName = localName;
}
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public CodeCatchClause(string localName, CodeTypeReference catchExceptionType) {
this.localName = localName;
this.catchExceptionType = catchExceptionType;
}
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public CodeCatchClause(string localName, CodeTypeReference catchExceptionType, params CodeStatement[] statements) {
this.localName = localName;
this.catchExceptionType = catchExceptionType;
Statements.AddRange(statements);
}
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public string LocalName {
get {
return (localName == null) ? string.Empty: localName;
}
set {
localName = value;
}
}
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public CodeTypeReference CatchExceptionType {
get {
if (catchExceptionType == null) {
catchExceptionType = new CodeTypeReference(typeof(System.Exception));
}
return catchExceptionType;
}
set {
catchExceptionType = value;
}
}
/// <devdoc>
/// <para>
/// Gets or sets the statements within the clause.
/// </para>
/// </devdoc>
public CodeStatementCollection Statements {
get {
if (statements == null) {
statements = new CodeStatementCollection();
}
return statements;
}
}
}
}

View File

@@ -0,0 +1,139 @@
// ------------------------------------------------------------------------------
// <copyright file="CodeCatchClauseCollection.cs" company="Microsoft">
//
// <OWNER>[....]</OWNER>
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
// ------------------------------------------------------------------------------
//
namespace System.CodeDom {
using System;
using System.Collections;
using System.Runtime.InteropServices;
/// <devdoc>
/// <para>
/// A collection that stores <see cref='System.CodeDom.CodeCatchClause'/> objects.
/// </para>
/// </devdoc>
[
ClassInterface(ClassInterfaceType.AutoDispatch),
ComVisible(true),
Serializable,
]
public class CodeCatchClauseCollection : CollectionBase {
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeCatchClauseCollection'/>.
/// </para>
/// </devdoc>
public CodeCatchClauseCollection() {
}
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeCatchClauseCollection'/> based on another <see cref='System.CodeDom.CodeCatchClauseCollection'/>.
/// </para>
/// </devdoc>
public CodeCatchClauseCollection(CodeCatchClauseCollection value) {
this.AddRange(value);
}
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeCatchClauseCollection'/> containing any array of <see cref='System.CodeDom.CodeCatchClause'/> objects.
/// </para>
/// </devdoc>
public CodeCatchClauseCollection(CodeCatchClause[] value) {
this.AddRange(value);
}
/// <devdoc>
/// <para>Represents the entry at the specified index of the <see cref='System.CodeDom.CodeCatchClause'/>.</para>
/// </devdoc>
public CodeCatchClause this[int index] {
get {
return ((CodeCatchClause)(List[index]));
}
set {
List[index] = value;
}
}
/// <devdoc>
/// <para>Adds a <see cref='System.CodeDom.CodeCatchClause'/> with the specified value to the
/// <see cref='System.CodeDom.CodeCatchClauseCollection'/> .</para>
/// </devdoc>
public int Add(CodeCatchClause value) {
return List.Add(value);
}
/// <devdoc>
/// <para>Copies the elements of an array to the end of the <see cref='System.CodeDom.CodeCatchClauseCollection'/>.</para>
/// </devdoc>
public void AddRange(CodeCatchClause[] value) {
if (value == null) {
throw new ArgumentNullException("value");
}
for (int i = 0; ((i) < (value.Length)); i = ((i) + (1))) {
this.Add(value[i]);
}
}
/// <devdoc>
/// <para>
/// Adds the contents of another <see cref='System.CodeDom.CodeCatchClauseCollection'/> to the end of the collection.
/// </para>
/// </devdoc>
public void AddRange(CodeCatchClauseCollection value) {
if (value == null) {
throw new ArgumentNullException("value");
}
int currentCount = value.Count;
for (int i = 0; i < currentCount; i = ((i) + (1))) {
this.Add(value[i]);
}
}
/// <devdoc>
/// <para>Gets a value indicating whether the
/// <see cref='System.CodeDom.CodeCatchClauseCollection'/> contains the specified <see cref='System.CodeDom.CodeCatchClause'/>.</para>
/// </devdoc>
public bool Contains(CodeCatchClause value) {
return List.Contains(value);
}
/// <devdoc>
/// <para>Copies the <see cref='System.CodeDom.CodeCatchClauseCollection'/> values to a one-dimensional <see cref='System.Array'/> instance at the
/// specified index.</para>
/// </devdoc>
public void CopyTo(CodeCatchClause[] array, int index) {
List.CopyTo(array, index);
}
/// <devdoc>
/// <para>Returns the index of a <see cref='System.CodeDom.CodeCatchClause'/> in
/// the <see cref='System.CodeDom.CodeCatchClauseCollection'/> .</para>
/// </devdoc>
public int IndexOf(CodeCatchClause value) {
return List.IndexOf(value);
}
/// <devdoc>
/// <para>Inserts a <see cref='System.CodeDom.CodeCatchClause'/> into the <see cref='System.CodeDom.CodeCatchClauseCollection'/> at the specified index.</para>
/// </devdoc>
public void Insert(int index, CodeCatchClause value) {
List.Insert(index, value);
}
/// <devdoc>
/// <para> Removes a specific <see cref='System.CodeDom.CodeCatchClause'/> from the
/// <see cref='System.CodeDom.CodeCatchClauseCollection'/> .</para>
/// </devdoc>
public void Remove(CodeCatchClause value) {
List.Remove(value);
}
}
}

View File

@@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <copyright file="CodeChecksumPragma.cs" company="Microsoft">
//
// <OWNER>[....]</OWNER>
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
namespace System.CodeDom {
using System.Diagnostics;
using System;
using Microsoft.Win32;
using System.Collections;
using System.Runtime.InteropServices;
[
ClassInterface(ClassInterfaceType.AutoDispatch),
ComVisible(true),
Serializable,
]
public class CodeChecksumPragma: CodeDirective {
private string fileName;
private byte[] checksumData;
private Guid checksumAlgorithmId;
public CodeChecksumPragma() {
}
public CodeChecksumPragma(string fileName, Guid checksumAlgorithmId, byte[] checksumData) {
this.fileName = fileName;
this.checksumAlgorithmId = checksumAlgorithmId;
this.checksumData = checksumData;
}
public string FileName {
get {
return (fileName == null) ? string.Empty : fileName;
}
set {
fileName = value;
}
}
public Guid ChecksumAlgorithmId {
get {
return checksumAlgorithmId;
}
set {
checksumAlgorithmId = value;
}
}
public byte[] ChecksumData {
get {
return checksumData;
}
set {
checksumData = value;
}
}
}
}

View File

@@ -0,0 +1,82 @@
//------------------------------------------------------------------------------
// <copyright file="CodeComment.cs" company="Microsoft">
//
// <OWNER>[....]</OWNER>
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
namespace System.CodeDom {
using System.Diagnostics;
using System;
using Microsoft.Win32;
using System.Collections;
using System.Runtime.InteropServices;
/// <devdoc>
/// <para> Represents a comment.</para>
/// </devdoc>
[
ClassInterface(ClassInterfaceType.AutoDispatch),
ComVisible(true),
Serializable,
]
public class CodeComment : CodeObject {
private string text;
private bool docComment = false;
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeComment'/>.
/// </para>
/// </devdoc>
public CodeComment() {
}
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeComment'/> with the specified text as
/// contents.
/// </para>
/// </devdoc>
public CodeComment(string text) {
Text = text;
}
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public CodeComment(string text, bool docComment) {
Text = text;
this.docComment = docComment;
}
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public bool DocComment {
get {
return docComment;
}
set {
docComment = value;
}
}
/// <devdoc>
/// <para>
/// Gets or setes
/// the text of the comment.
/// </para>
/// </devdoc>
public string Text {
get {
return (text == null) ? string.Empty : text;
}
set {
text = value;
}
}
}
}

View File

@@ -0,0 +1,72 @@
//------------------------------------------------------------------------------
// <copyright file="CodeCommentStatement.cs" company="Microsoft">
//
// <OWNER>[....]</OWNER>
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
namespace System.CodeDom {
using System.Diagnostics;
using System;
using Microsoft.Win32;
using System.Collections;
using System.Runtime.InteropServices;
/// <devdoc>
/// <para> Represents a comment.</para>
/// </devdoc>
[
ClassInterface(ClassInterfaceType.AutoDispatch),
ComVisible(true),
Serializable,
]
public class CodeCommentStatement : CodeStatement {
private CodeComment comment;
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeCommentStatement'/>.
/// </para>
/// </devdoc>
public CodeCommentStatement() {
}
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public CodeCommentStatement(CodeComment comment) {
this.comment = comment;
}
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeCommentStatement'/> with the specified text as
/// contents.
/// </para>
/// </devdoc>
public CodeCommentStatement(string text) {
comment = new CodeComment(text);
}
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public CodeCommentStatement(string text, bool docComment) {
comment = new CodeComment(text, docComment);
}
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public CodeComment Comment {
get {
return comment;
}
set {
comment = value;
}
}
}
}

View File

@@ -0,0 +1,139 @@
// ------------------------------------------------------------------------------
// <copyright file="CodeCommentStatementCollection.cs" company="Microsoft">
//
// <OWNER>[....]</OWNER>
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
// ------------------------------------------------------------------------------
//
namespace System.CodeDom {
using System;
using System.Collections;
using System.Runtime.InteropServices;
/// <devdoc>
/// <para>
/// A collection that stores <see cref='System.CodeDom.CodeCommentStatement'/> objects.
/// </para>
/// </devdoc>
[
ClassInterface(ClassInterfaceType.AutoDispatch),
ComVisible(true),
Serializable,
]
public class CodeCommentStatementCollection : CollectionBase {
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeCommentStatementCollection'/>.
/// </para>
/// </devdoc>
public CodeCommentStatementCollection() {
}
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeCommentStatementCollection'/> based on another <see cref='System.CodeDom.CodeCommentStatementCollection'/>.
/// </para>
/// </devdoc>
public CodeCommentStatementCollection(CodeCommentStatementCollection value) {
this.AddRange(value);
}
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeCommentStatementCollection'/> containing any array of <see cref='System.CodeDom.CodeCommentStatement'/> objects.
/// </para>
/// </devdoc>
public CodeCommentStatementCollection(CodeCommentStatement[] value) {
this.AddRange(value);
}
/// <devdoc>
/// <para>Represents the entry at the specified index of the <see cref='System.CodeDom.CodeCommentStatement'/>.</para>
/// </devdoc>
public CodeCommentStatement this[int index] {
get {
return ((CodeCommentStatement)(List[index]));
}
set {
List[index] = value;
}
}
/// <devdoc>
/// <para>Adds a <see cref='System.CodeDom.CodeCommentStatement'/> with the specified value to the
/// <see cref='System.CodeDom.CodeCommentStatementCollection'/> .</para>
/// </devdoc>
public int Add(CodeCommentStatement value) {
return List.Add(value);
}
/// <devdoc>
/// <para>Copies the elements of an array to the end of the <see cref='System.CodeDom.CodeCommentStatementCollection'/>.</para>
/// </devdoc>
public void AddRange(CodeCommentStatement[] value) {
if (value == null) {
throw new ArgumentNullException("value");
}
for (int i = 0; ((i) < (value.Length)); i = ((i) + (1))) {
this.Add(value[i]);
}
}
/// <devdoc>
/// <para>
/// Adds the contents of another <see cref='System.CodeDom.CodeCommentStatementCollection'/> to the end of the collection.
/// </para>
/// </devdoc>
public void AddRange(CodeCommentStatementCollection value) {
if (value == null) {
throw new ArgumentNullException("value");
}
int currentCount = value.Count;
for (int i = 0; i < currentCount; i = ((i) + (1))) {
this.Add(value[i]);
}
}
/// <devdoc>
/// <para>Gets a value indicating whether the
/// <see cref='System.CodeDom.CodeCommentStatementCollection'/> contains the specified <see cref='System.CodeDom.CodeCommentStatement'/>.</para>
/// </devdoc>
public bool Contains(CodeCommentStatement value) {
return List.Contains(value);
}
/// <devdoc>
/// <para>Copies the <see cref='System.CodeDom.CodeCommentStatementCollection'/> values to a one-dimensional <see cref='System.Array'/> instance at the
/// specified index.</para>
/// </devdoc>
public void CopyTo(CodeCommentStatement[] array, int index) {
List.CopyTo(array, index);
}
/// <devdoc>
/// <para>Returns the index of a <see cref='System.CodeDom.CodeCommentStatement'/> in
/// the <see cref='System.CodeDom.CodeCommentStatementCollection'/> .</para>
/// </devdoc>
public int IndexOf(CodeCommentStatement value) {
return List.IndexOf(value);
}
/// <devdoc>
/// <para>Inserts a <see cref='System.CodeDom.CodeCommentStatement'/> into the <see cref='System.CodeDom.CodeCommentStatementCollection'/> at the specified index.</para>
/// </devdoc>
public void Insert(int index, CodeCommentStatement value) {
List.Insert(index, value);
}
/// <devdoc>
/// <para> Removes a specific <see cref='System.CodeDom.CodeCommentStatement'/> from the
/// <see cref='System.CodeDom.CodeCommentStatementCollection'/> .</para>
/// </devdoc>
public void Remove(CodeCommentStatement value) {
List.Remove(value);
}
}
}

View File

@@ -0,0 +1,109 @@
//------------------------------------------------------------------------------
// <copyright file="CodeCompileUnit.cs" company="Microsoft">
//
// <OWNER>[....]</OWNER>
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
namespace System.CodeDom {
using System.Diagnostics;
using System;
using Microsoft.Win32;
using System.Collections;
using System.Collections.Specialized;
using System.Runtime.Serialization;
using System.Runtime.InteropServices;
/// <devdoc>
/// <para>
/// Represents a
/// compilation unit declaration.
/// </para>
/// </devdoc>
[
ClassInterface(ClassInterfaceType.AutoDispatch),
ComVisible(true),
Serializable,
]
public class CodeCompileUnit: CodeObject {
private CodeNamespaceCollection namespaces = new CodeNamespaceCollection();
private StringCollection assemblies = null;
private CodeAttributeDeclarationCollection attributes = null;
// Optionally Serializable
[OptionalField]
private CodeDirectiveCollection startDirectives = null;
[OptionalField]
private CodeDirectiveCollection endDirectives = null;
/// <devdoc>
/// <para>
/// Initializes a new instance of <see cref='System.CodeDom.CodeCompileUnit'/>.
/// </para>
/// </devdoc>
public CodeCompileUnit() {
}
/// <devdoc>
/// <para>
/// Gets or sets the collection of namespaces.
/// </para>
/// </devdoc>
public CodeNamespaceCollection Namespaces {
get {
return namespaces;
}
}
/// <devdoc>
/// <para>
/// Gets the collection of assemblies. Most code generators will not need this, but the Managed
/// extensions for C++ code generator and
/// other very low level code generators will need to do a more complete compilation. If both this
/// and the compiler assemblies are specified, the compiler assemblies should win.
/// </para>
/// </devdoc>
public StringCollection ReferencedAssemblies {
get {
if (assemblies == null) {
assemblies = new StringCollection();
}
return assemblies;
}
}
/// <devdoc>
/// <para>
/// Gets the collection of assembly level attributes.
/// </para>
/// </devdoc>
public CodeAttributeDeclarationCollection AssemblyCustomAttributes {
get {
if (attributes == null) {
attributes = new CodeAttributeDeclarationCollection();
}
return attributes;
}
}
public CodeDirectiveCollection StartDirectives {
get {
if (startDirectives == null) {
startDirectives = new CodeDirectiveCollection();
}
return startDirectives;
}
}
public CodeDirectiveCollection EndDirectives {
get {
if (endDirectives == null) {
endDirectives = new CodeDirectiveCollection();
}
return endDirectives ;
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More