Commit Graph
41 Commits
Author SHA1 Message Date
Lluis Sanchez ed29cec4db 2009-10-22 Lluis Sanchez Gual <[email protected]>
* CodeNamespaceImportCollection.cs: Properly update the internal
	keys hashtable when there are changes in the items.


svn path=/trunk/mcs/; revision=144649
2009-10-22 16:22:57 +00:00
Gonzalo Paniagua Javier c0a0a8adc1 2009-09-30 Gonzalo Paniagua Javier <[email protected]>
* CodeNamespace.cs:
	* CodeTypeReference.cs:
	* CodeMemberMethod.cs:
	* CodeCompileUnit.cs:
	* CodeNamespaceImportCollection.cs:
	* CodeTypeDeclaration.cs: renamed/added fields so that we're
	compatible with MS serialization.


svn path=/trunk/mcs/; revision=143102
2009-10-01 01:43:49 +00:00
Marek Habersack 290b8a6b66 2009-08-13 Marek Habersack <[email protected]>
* CodeTypeReferenceTest.cs: added test for bug #523341

2009-08-13  Marek Habersack  <[email protected]>

	* CodeTypeReference.cs: generic types specialized on arrays must
	not be treated as array declarations. Fixes bug #523341

svn path=/trunk/mcs/; revision=139819
2009-08-12 23:50:32 +00:00
Juraj Skripsky 9b56a80c04 2008-02-10 Juraj Skripsky <[email protected]>
* System.dll.sources: Added ICodeDomVisitor.cs.

2008-02-10  Juraj Skripsky  <[email protected]>

	* CodeObject.cs: Add empty Visit method implementation.
	
	* CodeArgumentReferenceExpression.cs, CodeArrayCreateExpression.cs,
	CodeArrayIndexerExpression.cs, CodeAssignStatement.cs,
	CodeAttachEventStatement.cs, CodeBaseReferenceExpression.cs,
	CodeBinaryOperatorExpression.cs, CodeCastExpression.cs,
	CodeCommentStatement.cs, CodeConditionStatement.cs,
	CodeConstructor.cs, CodeDefaultValueExpression.cs,
	CodeDelegateCreateExpression.cs, CodeDelegateInvokeExpression.cs,
	CodeDirectionExpression.cs, CodeEntryPointMethod.cs,
	CodeEventReferenceExpression.cs, CodeExpressionStatement.cs,
	CodeFieldReferenceExpression.cs, CodeGotoStatement.cs,
	CodeIndexerExpression.cs, CodeIterationStatement.cs,
	CodeLabeledStatement.cs, CodeMemberEvent.cs,
	CodeMemberField.cs, CodeMemberMethod.cs,
	CodeMemberProperty.cs, CodeMethodInvokeExpression.cs,
	CodeMethodReferenceExpression.cs, CodeMethodReturnStatement.cs,
	CodeObjectCreateExpression.cs, CodeParameterDeclarationExpression.cs,
	CodePrimitiveExpression.cs, CodePropertyReferenceExpression.cs,
	CodePropertySetValueReferenceExpression.cs, CodeRemoveEventStatement.cs, 
	CodeSnippetExpression.cs, CodeSnippetTypeMember.cs,
	CodeThisReferenceExpression.cs, CodeThrowExceptionStatement.cs,
	CodeTryCatchFinallyStatement.cs, CodeTypeConstructor.cs,
	CodeTypeOfExpression.cs, CodeTypeReferenceExpression.cs,
	CodeVariableDeclarationStatement.cs, CodeVariableReferenceExpression.cs:
	Add Visit method implementation.

2008-02-10  Juraj Skripsky  <[email protected]>

	* CodeGenerator.cs: Mark CurrentClass internal for NET_1_1.
	Add nested Visitor class and member. 
	GenerateExpression, GenerateStatement, GenerateType: Use visitor.
	GeneratePrimitiveExpression: Replace if-else chain with switch
	on TypeCode.


svn path=/trunk/mcs/; revision=95401
2008-02-10 20:01:25 +00:00
Atsushi Eno 62a6678fad 2007-01-18 Atsushi Enomoto <[email protected]>
* CodeTypeReference.cs :
	  Support generic type definition in .ctor(Type)
	  Handle generic type in straightforward way in .ctor(Type), no need
	  to do ToString() and Parse().
	  Supply "`n" in .ctor(string,params CodeTypeReference[]).

	* CSharpCodeGenerator.cs : for GenericTypeParameter, GetTypeOutput()
	  should just print its name.
	  For generic type definition, print "<>". OutputTypeArguments() was
	  also causing IndexOutOfRangeException.

	* CodeGeneratorFromTypeTestBase.cs :
	  added GenerateGenericCodeTypeReferences() for generic type test.

	* CodeGeneratorFromTypeTest.cs :
	  Added test for generic type references output.

	* CodeTypeReferenceTest.cs :
	  Fixed generic type tests and let them involved in the actual tests.
	  Added some more generic type tests, including generic type
	  definition.


svn path=/trunk/mcs/; revision=71244
2007-01-18 10:23:33 +00:00
Miguel de Icaza a5bd130af9 2006-03-11 Miguel de Icaza <[email protected]>
* Uri.cs: Pragma disable warning 612 (Obsolete methods are being
	used by us internally).

	Ponder: should we instead move our methods to use new versions of
	the Obsoleted ones?

2006-03-11  Miguel de Icaza  <[email protected]>

	* CodeNamespaceImportCollection.cs: It turns out that a lot of the
	errors flagged with "!" were just missing explicit interface
	implementations.  

	Implement.

2006-03-11  Miguel de Icaza  <[email protected]>

	* CodeDomConfigurationHandler.cs: Comment out unused methods. 

	* TempFileCollection.cs: Implement explicitly some interface
	methods to get rid of the "!" errors on CorCompare.

2006-03-11  Miguel de Icaza  <[email protected]>

	* Queue.cs: Flag as serializable.

	* LinkedList.cs (OnDeserialization): Fix signature. 

	* SortedList.cs: Implement explicitly a few methods that were
	flagged by corcompare. 

2006-03-11  Miguel de Icaza  <[email protected]>

	* IOrderedDictionary.cs: Flag GetEnumerator as a "new" method to
	avoid warning.

2006-03-11  Miguel de Icaza  <[email protected]>

	* ConfigurationSettings.cs (ChangeConfigurationSettings): Make
	internal to avoid warnings.  This routine is called from
	System.Web with MethodInfo.Invoke.

2006-03-11  Miguel de Icaza  <[email protected]>

	* DeflateStream.cs: Comment out DllImport that was not being
	used. 

2006-03-11  Miguel de Icaza  <[email protected]>

	* y

	* SerialPort.cs: Remove unused variable (writeBuffer). 

	* SerialPortStream.cs (Dispose): override, not new.

2006-03-11  Miguel de Icaza  <[email protected]>

	* WebClient.cs: Only expose the right methods to avoid warnings. 

	* FtpDataStream.cs (Dispose): Fix signature.

	* FtpWebResponse.cs: Comment out keepAlive field (unused, sounds
	like we are missing features here).

	* IPAddress.cs: Move m_HashCode property to the end, and set
	pragmas to disable warnings.

2006-03-11  Miguel de Icaza  <[email protected]>

	* MailAddress.cs: Comment out unused field to remove warning. 

2006-03-11  Miguel de Icaza  <[email protected]>

	* NetworkChange.cs: Use pragmas to eliminate warnings from events
	that we do not trigger yet.

	This is a candidate for using Aaron's NetworkManager code.  But
	would make us depend on d-bus.

	* NetworkInformationException.cs: Use error_code for ErrorCode,
	instead of NativeErrorCode.   Fixes warning. 

2006-03-11  Miguel de Icaza  <[email protected]>

	* AuthenticatedStream.cs: Fixed normative parameter names (yes, we
	need to do this everywhere one day).

	(Close): actually obey the "leaveInnerStreamOpen" setting from the
	constructor. 

2006-03-11  Miguel de Icaza  <[email protected]>

	* NetworkStream.cs (Dispose): Use the right signature depending on
	the profile being built.

2006-03-11  Miguel de Icaza  <[email protected]>

	* X509Chain.cs: Flagged member as internal to avoid unused warning.

	* X500DistinguishedName.cs: Comment out unused names and move
	temporary unused variables inside the comments that were removed 



svn path=/trunk/mcs/; revision=57836
2006-03-11 19:07:56 +00:00
Gert Driesen e4e516d410 * CodeGeneratorFromStatementTest.cs: Added tests for
CodeAssignStatement, CodeAttachEventStatement,
CodeConditionStatement, CodeExpressionStatement,
CodeIterationStatement, CodeLabeledStatement,
CodeMethodReturnStatement, CodeRemoveEventStatement,
CodeSnippetStatement, CodeStatement, CodeVariableDeclarationStatement.
* CodeRemoveEventStatementTest.cs: Added tests for ctors.
* IndentedTextWriterTest.cs: Added tests for Indent property.
* CodeGeneratorFromStatementTest.cs: Added tests for
CodeAssignStatement, CodeAttachEventStatement, CodeConditionStatement,
CodeExpressionStatement, CodeIterationStatement,
CodeLabeledStatement, CodeMethodReturnStatement,
CodeRemoveEventStatement and CodeSnippetStatement.
* CSharpCodeGenerator.cs: No longer output semicolon and newline for
CodeVariableDeclarationStatement in for statement, fixes #75292.
Fixed NRE in GenerateEventReferenceExpression. Cosmetic changes to
code generated for iteration to match MS.NET. Temporary reduce
indentation for label and no longer escape label if its a keyword.
* CodeRemoveEventStatement.cs: Event returns new CodeEventReference
if underlying value is null.
* System_test.dll.sources: Added CodeRemoveEventStatementTest.cs from
System.CodeDom.
* CodeGenerator.cs: Corrected line endings. Set eol-style to native.
* IndentedTextWriter.cs: Indent can no longer become negative.
* VBCodeGenerator.cs: Fixed NRE in GenerateEventReferenceExpression,
and escape event name. Indent statements for iteration. Avoid
ArgumentNullException if expression is not set for CodeReturnStatement.
Temporary reduce indentation for label, and fixed ArgumentNullException
if no statement is set. Cosmetic changes to code generated for
condition to match MS.NET. In OutputTypeNamePair, escape name.

svn path=/trunk/mcs/; revision=53703
2005-11-30 18:54:17 +00:00
Gert Driesen e8c67296c0 * CodeParameterDeclarationExpressionCollection.cs: Use CollectionBase
implementation of IList.Remove to handle removal of item from
collection.
* CodeCatchClauseCollection.cs: Same.
* CodeStatementCollection.cs: Same.
* CodeAttributeDeclarationCollection.cs: Same.
* CodeTypeMemberCollection.cs: Same.
* CodeDirectiveCollection.cs: Same.
* CodeTypeDeclarationCollection.cs: Same.
* CodeNamespaceCollection.cs: Same.
* CodeExpressionCollection.cs: Same.
* CodeTypeReferenceCollection.cs: Same.
* CodeTypeParameterCollection.cs: Same.
* CodeCommentStatementCollection.cs: Same.
* CodeAttributeArgumentCollection.cs: Same.
* CodeTypeParameterCollectionTest.cs: Improve coverage of AddRange
test. Added Remove tests.
* CodeParameterDeclarationExpressionCollectionTest.cs: Same.
* CodeCatchClauseCollectionTest.cs: Same.
* CodeStatementCollectionTest.cs: Same.
* CodeTypeMemberCollectionTest.cs: Same.
* CodeExpressionCollectionTest.cs: Same.
* CodeTypeReferenceCollectionTest.cs: Same.
* CodeCommentStatementCollectionTest.cs: Same.
* CodeAttributeArgumentCollectionTest.cs: Same.
* CodeAttributeDeclarationCollectionTest.cs: Same.
* CodeDirectiveCollectionTest.cs: Same.
* CodeTypeDeclarationCollectionTest.cs: Same.
* CodeNamespaceCollectionTest.cs: Same.

svn path=/trunk/mcs/; revision=53293
2005-11-20 18:46:58 +00:00
Gert Driesen 6fbc846f5d * CodeEventReferenceExpression.cs: Set eol-style to native.
* CodeArgumentReferenceExpression.cs: Set eol-style to native.
* CodeParameterDeclarationExpressionCollection.cs: Set eol-style to native.
* CodeRegionMode.cs: Set eol-style to native.
* FieldDirection.cs: Set eol-style to native.
* CodeChecksumPragma.cs: Set eol-style to native.
* CodeCatchClauseCollection.cs: Set eol-style to native.
* CodeAttachEventStatement.cs: Set eol-style to native.
* CodeSnippetCompileUnit.cs: Set eol-style to native.
* CodeNamespace.cs: Set eol-style to native.
* CodePropertySetValueReferenceExpression.cs: Set eol-style to native.
* CodeTypeReference.cs: Set eol-style to native.
* CodeDirectionExpression.cs: Set eol-style to native.
* CodeThisReferenceExpression.cs: Set eol-style to native.
* CodeSnippetStatement.cs: Set eol-style to native.
* CodeMemberMethod.cs: Set eol-style to native.
* CodeMemberProperty.cs: Set eol-style to native.
* CodeEntryPointMethod.cs: Set eol-style to native.
* CodeTypeReferenceOptions.cs: Set eol-style to native.
* CodeIndexerExpression.cs: Set eol-style to native.
* CodeCatchClause.cs: Set eol-style to native.
* CodeStatementCollection.cs: Set eol-style to native.
* CodeRegionDirective.cs: Set eol-style to native.
* CodeTypeParameter.cs: Set eol-style to native.
* CodeIterationStatement.cs: Set eol-style to native.
* CodeRemoveEventStatement.cs: Set eol-style to native.
* CodeVariableReferenceExpression.cs: Set eol-style to native.
* CodeAttributeDeclarationCollection.cs: Set eol-style to native.
* CodeTryCatchFinallyStatement.cs: Set eol-style to native.
* CodeTypeMemberCollection.cs: Set eol-style to native.
* CodeCompileUnit.cs: Set eol-style to native.
* CodePrimitiveExpression.cs: Set eol-style to native.
* CodeDirectiveCollection.cs: Fixed line endings. Set eol-style to native.
* CodeTypeDeclarationCollection.cs: Set eol-style to native.
* CodeNamespaceImportCollection.cs: Set eol-style to native.
* CodeNamespaceCollection.cs: Set eol-style to native.
* CodeTypeMember.cs: Set eol-style to native.
* CodeAttributeDeclaration.cs: Set eol-style to native.
* CodeConditionStatement.cs: Set eol-style to native.
* CodeExpressionCollection.cs: Set eol-style to native.
* CodeTypeReferenceCollection.cs: Set eol-style to native.
* CodeSnippetTypeMember.cs: Set eol-style to native.
* CodeDelegateCreateExpression.cs: Set eol-style to native.
* CodeLinePragma.cs: Set eol-style to native.
* CodeMethodReferenceExpression.cs: Set eol-style to native.
* CodeVariableDeclarationStatement.cs: Set eol-style to native.
* CodeTypeReferenceExpression.cs: Set eol-style to native.
* CodeArrayCreateExpression.cs: Set eol-style to native.
* CodeFieldReferenceExpression.cs: Set eol-style to native.
* CodePropertyReferenceExpression.cs: Set eol-style to native.
* CodeTypeDeclaration.cs: Set eol-style to native.
* CodeTypeConstructor.cs: Set eol-style to native.
* CodeNamespaceImport.cs: Set eol-style to native.
* CodeTypeParameterCollection.cs: Use for loop instead of foreach to add
elements in AddRange method. Fixed line endings. Set eol-style to native.
* CodeTypeParameterCollection.cs: Set eol-style to native.
* CodeExpression.cs: Set eol-style to native.
* CodeBinaryOperatorType.cs: Set eol-style to native.
* CodeSnippetExpression.cs: Set eol-style to native.
* CodeCommentStatementCollection.cs: Set eol-style to native.
* CodeMethodReturnStatement.cs: Set eol-style to native.
* CodeObject.cs: Set eol-style to native.
* CodeParameterDeclarationExpression.cs: Set eol-style to native.
* CodeDelegateInvokeExpression.cs: Set eol-style to native.
* CodeThrowExceptionStatement.cs: Set eol-style to native.
* CodeObjectCreateExpression.cs: Set eol-style to native.
* CodeTypeDelegate.cs: Set eol-style to native.
* CodeLabeledStatement.cs: Set eol-style to native.
* CodeArrayIndexerExpression.cs: Set eol-style to native.
* CodeBinaryOperatorExpression.cs: Set eol-style to native.
* CodeAttributeArgumentCollection.cs: Set eol-style to native.
* MemberAttributes.cs: Set eol-style to native.
* CodeExpressionStatement.cs: Set eol-style to native.
* CodeConstructor.cs: Set eol-style to native.
* CodeTypeOfExpression.cs: Set eol-style to native.
* CodeCommentStatement.cs: Set eol-style to native.
* CodeGotoStatement.cs: Set eol-style to native.
* CodeComment.cs: Set eol-style to native.
* CodeStatement.cs: Set eol-style to native.
* CodeMemberEvent.cs: Set eol-style to native.
* CodeBaseReferenceExpression.cs: Set eol-style to native.
* CodeAssignStatement.cs: Set eol-style to native.
* CodeCastExpression.cs: Set eol-style to native.
* CodeMemberField.cs: Set eol-style to native.
* CodeMethodInvokeExpression.cs: Set eol-style to native.
* CodeDirective.cs: Set eol-style to native.

svn path=/trunk/mcs/; revision=53289
2005-11-20 17:38:12 +00:00
Gert Driesen 1994a6236a * CodeTypeParameterCollectionTest.cs: Added tests for ctors, and
Add/AddRange/Insert methods.
* CodeCatchClauseCollectionTest.cs: Added tests for ctors, and
Add/AddRange/Insert methods.
* CodeStatementCollectionTest.cs: Added AddRange test for null item.
* CodeTypeMemberCollectionTest.cs: Added tests for ctors, and
Add/AddRange/Insert methods.
* CodeCommentStatementCollectionTest.cs: Added tests for ctors, and
Add/AddRange/Insert methods.
* CodeAttributeArgumentCollectionTest.cs: Added tests for ctors, and
Add/AddRange/Insert methods.
* CodeAttributeDeclarationCollectionTest.cs: Added tests for ctors,
and Add/AddRange/Insert methods.
* CodeDirectiveCollectionTest.cs: Added tests for ctors, and
Add/AddRange/Insert methods.
* CodeTypeDeclarationCollectionTest.cs: Added tests for ctors, and
Add/AddRange/Insert methods.
* CodeNamespaceImportCollectionTest.cs: Added tests for ctor, Add and
AddRange methods.
* CodeNamespaceCollectionTest.cs: Added tests for ctors, and
Add/AddRange/Insert methods.
* CodeCatchClauseCollection.cs: Added null check to AddRange overloads
and use for loop to add elements.
* CodeAttributeDeclarationCollection.cs: Added null check to AddRange
overloads and use for loop to add elements.
* CodeTypeMemberCollection.cs: Added null check to AddRange overloads
and use for loop to add elements.
* CodeTypeDeclarationCollection.cs: Added null check to AddRange
overloads and use for loop to add elements.
* CodeNamespaceImportCollection.cs: Added null check to Add and perform
case-insensitive check on namespace to avoid duplicate namespace
imports. Added null check to AddRange method.
* CodeNamespaceCollection.cs: Added null check to AddRange overloads
and use for loop to add elements.
* CodeCommentStatementCollection.cs: Added null check to AddRange
overloads and use for loop to add elements.
* CodeAttributeArgumentCollection.cs: Added null check to AddRange
overloads and use for loop to add elements.
* CodeDirectiveCollection.cs: Added null check to AddRange overloads
and use for loop to add elements.
* CodeTypeParameterCollection.cs: Added null check to AddRange
overloads and use for loop to add elements.
* System_test.dll.sources: Added CodeNamespaceImportCollectionTest.cs,
CodeNamespaceCollectionTest.cs, CodeTypeDeclarationCollectionTest.cs,
CodeTypeMemberCollectionTest.cs, CodeTypeParameterCollectionTest.cs,
CodeAttributeArgumentCollectionTest.cs, CodeDirectiveCollectionTest.cs,
CodeAttributeDeclarationCollectionTest.cs,
CodeCatchClauseCollectionTest.cs,
CodeCommentStatementCollectionTest.cs.

svn path=/trunk/mcs/; revision=53288
2005-11-20 17:21:40 +00:00
Gert Driesen 1add0ac303 * CodeExpressionCollection.cs: Fixed OutOfMemoryException when
passing collection to AddRange method on itself.
* CodeTypeReferenceCollection.cs: same.
* CodeParameterDeclarationExpressionCollection.cs: same.
* CodeStatementCollection.cs: same.

svn path=/trunk/mcs/; revision=52725
2005-11-08 19:49:26 +00:00
Gert Driesen 553a7f2083 * System_test.dll.sources: Added CodeCastExpressionTest.cs,
CodeCatchClauseTest.cs, CodeChecksumPragmaTest.cs,
CodeConstructorTest.cs, CodeDefaultValueExpressionTest.cs;
CodeDelegateCreateExpressionTest.cs, CodeEventReferenceExpressionTest.cs
CodeGotoStatementTest.cs, CodeLabeledStatementTest.cs,
CodeLinePragmaTest.cs, CodeMemberMethodTest.cs,
CodeMethodInvokeExpressionTest.cs, CodeMethodReferenceExpressionTest.cs,
CodeNamespaceImportTest.cs, CodeNamespaceTest.cs,
CodeObjectCreateExpressionTest.cs,
CodeParameterDeclarationExpressionTest.cs,
CodePropertyReferenceExpressionTest.cs, CodeRegionDirectiveTest.cs,
CodeSnippetCompileUnitTest.cs, CodeSnippetExpressionTest.cs,
CodeSnippetStatementTest.cs, CodeSnippetTypeMemberTest.cs,
CodeStatementCollectionTest.cs, CodeTypeConstructorTest.cs,
CodeTypeParameterTest.cs, CodeTypeOfExpressionTest.cs,
CodeTypeReferenceExpressionTest.cs,
CodeVariableDeclarationStatementTest.cs,
CodeVariableReferenceExpressionTest.cs
* CSharpCodeGenerator.cs: Ignore ChecksumData of CodeChecksumPragma
if null.
* CodeTypeReferenceExpressionTest.cs: Added tests.
* CodeVariableDeclarationStatementTest.cs: Added tests.
* CodePropertyReferenceExpressionTest.cs: Added tests.
* CodeNamespaceImportTest.cs: Added tests.
* CodeTypeConstructorTest.cs: Added tests.
* CodeSnippetExpressionTest.cs: Added tests.
* CodeParameterDeclarationExpressionTest.cs: Added tests.
* CodeObjectCreateExpressionTest.cs: Added tests.
* CodeTypeDelegateTest.cs: Set eol-style to native.
* CodeLabeledStatementTest.cs: Added tests.
* CodeConstructorTest.cs: Added tests.
* CodeTypeOfExpressionTest.cs: Added tests.
* CodeGotoStatementTest.cs: Added tests.
* CodeCastExpressionTest.cs: Added tests.
* CodeMemberFieldTest.cs: Set eol-style to native.
* CodeMethodInvokeExpressionTest.cs: Added tests.
* CodeEventReferenceExpressionTest.cs: Added tests.
* CodeChecksumPragmaTest.cs: Added tests.
* CodeSnippetCompileUnitTest.cs: Added tests.
* CodeNamespaceTest.cs: Added tests.
* CodeSnippetStatementTest.cs: Added tests.
* CodeMemberMethodTest.cs: Added tests.
* CodeMemberPropertyTest.cs: Set eol-style to native.
* CodeCatchClauseTest.cs: Added tests.
* CodeStatementCollectionTest.cs: Added tests.
* CodeRegionDirectiveTest.cs: Added tests.
* CodeTypeParameterTest.cs: Added tests.
* CodeVariableReferenceExpressionTest.cs: Added tests.
* CodeDefaultValueExpressionTest.cs: Added tests.
* CodeSnippetTypeMemberTest.cs: Added tests.
* CodeDelegateCreateExpressionTest.cs: Added tests.
* CodeLinePragmaTest.cs: Added tests.
* CodeMethodReferenceExpressionTest.cs: Added tests.
* CodeEventReferenceExpression.cs: EventName now returns zero-length
string if underlying value is null.
* CodeParameterDeclarationExpressionCollection.cs: Fixed AddRange to
add each item to collection using Add method to ensure validation
is performed.
* CodeChecksumPragma.cs: FileName now returns zero-length string
if underlying value is null.
* CodeSnippetCompileUnit.cs: Value now returns zero-length string if
underlying value is null.
* CodeNamespace.cs: Name now returns zero-length string if underlying
value is null.
* CodeSnippetStatement.cs: Value now returns zero-length string if
underlying value is null.
* CodeMemberMethod.cs: code formatting change.
* CodeCatchClause.cs: CatchExceptionType now returns CodeTypeReference
instance for System.Exception if underlying value is null. LocalName
now returns zero-length string if underlying value is null.
* CodeStatementCollection.cs: Fixed AddRange to add each item to
collection using Add method to ensure validation is performed. Code
formatting changes.
* CodeRegionDirective.cs: RegionText now returns zero-length string
if underlying value is null.
* CodeTypeParameter.cs: Name now returns zero-length string if
underlying value is null.
* CodeVariableReferenceExpression.cs: VariableName now returns
zero-length string if underlying value is null.
* CodeDefaultValueExpression.cs: Type now returns CodeTypeReference
for void if underlying value is null.
* CodeExpressionCollection.cs: Fixed AddRange to add each item to
collection using Add method to ensure validation is performed.
* CodeSnippetTypeMember.cs: Text now returns zero-length string if
underlying value is null.
* CodeTypeReferenceCollection.cs: Fixed AddRange to add each item
to collection using Add method to ensure validation is performed.
* CodeDelegateCreateExpression.cs: DelegateType now returns
CodeTypeReference for void if underlying value is null. MethodName
now returns zero-length string if underlying value is null.
* CodeMethodReferenceExpression.cs: MethodName now returns
zero-length string if underlying value is null.
* CodeLinePragma.cs: FileName now returns zero-length string if
underlying value is null.
* CodeTypeReferenceExpression.cs: Type now return CodeTypeReference
for void if underlying value is null.
* CodeVariableDeclarationStatement.cs: Name now return zero-length
string if underlying value is null. Type returns CodeTypeReference
for void if underlying value is null.
* CodePropertyReferenceExpression.cs: PropertyName now returns
zero-length string if underlying value is null.
* CodeNamespaceImport.cs: Namespace now returns zero-length string
if underlying value is null.
* CodeTypeConstructor.cs: Name is fixed to ".cctor" to match MS.NET.
* CodeSnippetExpression.cs: Value now returns zero-length string if
underlying value is null.
* CodeParameterDeclarationExpression.cs: Name now returns zero-length
string if underlying value is null. Type now returns CodeTypeReference
for void if underlying value is null.
* CodeObjectCreateExpression.cs: CreateType now returns
CodeTypeReference for void if underlying value is null.
* CodeLabeledStatement.cs: Label returns zero-length string if
underlying value is null.
* CodeConstructor.cs: Name is fixed to ".ctor" to match MS.NET.
* CodeTypeOfExpression.cs: Type returns CodeTypeReference for void
if underlying value is null.
* CodeGotoStatement.cs: Only throw ArgumentNullException for null or
zero-length label on 2.0 profile.
* CodeCastExpression.cs: TargetType returns CodeTypeReference for void
if underlying value is null.
* CodeMethodInvokeExpression.cs: Method returns a default
CodeMethodReferenceExpression instance if the underlying value is
null.

svn path=/trunk/mcs/; revision=52579
2005-11-04 16:09:59 +00:00
Gert Driesen 23859c3aa4 * CodeArgumentReferenceExpressionTest.cs: Fixed namespace.
* CodeArrayCreateExpressionTest.cs: Fixed namespace.
* CodeAttachEventStatementTest.cs: Fixed namespace and added tests for
contructors that were not covered.
* CodeAttributeArgumentTest.cs: Fixed namespace.
* CodeAttributeDeclarationTest.cs: Fixed namespace and added tests for
constructors that were not covered.
* CodeAttachEventStatement.cs: Fixed extra removal in r52147.
* CodeAttributeDeclaration.cs: Make sure AttributeType is updated
when Name is set or changed. For constructors taking attribute type,
use BaseType of attribute type as name of CodeAttributeDeclaration.

svn path=/trunk/mcs/; revision=52190
2005-10-25 16:49:00 +00:00
Sebastien Pouliot 38ac982dc8 2005-10-25 Sebastien Pouliot <[email protected]>
* CodeAttributeDeclaration.cs: Fixed extra removal in r52147.


svn path=/trunk/mcs/; revision=52186
2005-10-25 16:05:50 +00:00
Gert Driesen cdfa103b25 * CodeArgumentReferenceExpressionTest.cs: Added test for default ctor
and default value of ParameterName.
* CodeArrayCreateExpressionTest.cs: Added test for default ctor and
default value of CreateType.
* CodeAttachEventStatementTest.cs: Added test for default ctor and
default value of Event.
* CodeAttributeArgumentTest.cs: Added test for default ctor and default
value of Name.
* CodeAttributeDeclarationTest.cs: Added test for default ctor and
default value of Name.
* System_test.dll.sources: Added CodeArgumentReferenceExceptionTest.cs,
CodeArrayCreateExpressionTest.cs, CodeAttachEventStatementTest.cs,
CodeAttributeArgumentTest.cs, CodeAttributeDeclarationTest.cs.
* CodeArgumentReferenceExpression.cs: If ParameterName is null, return
string.Empty.
* CodeArrayCreateExpression.cs: Implement default value in CreateType
property.
* CodeAttachEventStatement.cs: Implement default value in Event
property.
* CodeAttributeArgument.cs: Implement default value in Name property.
* CodeAttributeDeclaration.cs: Implement default value in Name
property.

svn path=/trunk/mcs/; revision=52147
2005-10-24 20:07:57 +00:00
Gert Driesen 4da2e88823 * CodeTypeReferenceTest.cs: Enabled test case for bug #76535. Added
few additional tests for null or zero length data type of array.
* CodeTypeReference.cs: Ignore ArrayElementType for determining
BaseType if ArrayRank is zero or less. Fixes bug #76535.

svn path=/trunk/mcs/; revision=52130
2005-10-24 15:46:17 +00:00
Sebastien Pouliot 899b184bce 2005-10-24 Sebastien Pouliot <[email protected]>
* CodeArgumentReferenceExpression.cs: Added default value for 
	arameterName.
	* CodeArrayCreateExpression.cs: Added default value for createType.
	* CodeAttachEventStatement.cs: Added default value for eventRef.
	* CodeAttributeArgument.cs: Added default value for name.
	* CodeAttributeArgumentCollection.cs: Fixed AddRange methods not to
	throw an exception (as the list was being changed when using an 
	numerator).
	* CodeAttributeDeclaration.cs: Added default value for name.
	* CodeAttributeDeclarationCollection.cs: Fixed AddRange methods not to
	throw an exception (as the list was being changed when using an 
	numerator).
	* CodeCastExpression.cs: Added default value for targetType.
	* CodeCatchClause.cs: Added default value for catchExceptionType and 
	ocalName.
	* CodeCatchClauseCollection.cs: Fixed AddRange methods not to throw an
	xception (as the list was being changed when using an enumerator).
	* CodeCommentStatementCollection.cs: Fixed AddRange methods not to 
	hrow an exception (as the list was being changed when using an 
	numerator).
	* CodeDelegateCreateExpression.cs: Added default value for 
	elegateType and methodName.
	* CodeEventReferenceExpression.cs: Added default value for eventName.
	* CodeExpressionCollection.cs: Fixed AddRange methods not to throw an
	xception (as the list was being changed when using an enumerator).
	* CodeFieldReferenceExpression.cs: Added default value for fieldName.
	* CodeMethodInvokeExpression.cs: Added default value for method.
	* CodeMethodReferenceExpression.cs: Added default value for methodName
	* CodeNamespace.cs: Added default value for name.
	* CodeNamespaceCollection.cs: Fixed AddRange methods not to throw an 
	xception (as the list was being changed when using an enumerator).
	* CodeNamespaceImport.cs: Added default value for nameSpace.
	* CodeNamespaceImportCollection.cs: SyncRoot returns null.
	* CodeObjectCreateExpression.cs: Added default value for createType.
	* CodeParameterDeclarationExpression.cs: Added default value for name 
	and type.
	* CodeParameterDeclarationExpressionCollection.cs: Fixed AddRange 
	methods not to throw an exception (as the list was being changed when 
	using an enumerator).
	* CodePropertyReferenceExpression.cs: Added default value for 
	propertyName.
	* CodeRemoveEventStatement.cs: Added default value for eventRef.
	* CodeSnippetExpression.cs: Added default value for value.
	* CodeSnippetStatement.cs: Added default value for value.
	* CodeSnippetTypeMember.cs: Added default value for text.
	* CodeStatementCollection.cs: Fixed AddRange methods not to throw an 
	exception (as the list was being changed when using an enumerator).
	* CodeTypeDeclarationCollection.cs: Fixed AddRange methods not to 
	throw an exception (as the list was being changed when using an 
	enumerator).
	* CodeTypeMemberCollection.cs: Fixed AddRange methods not to throw an
	exception (as the list was being changed when using an enumerator).
	* CodeTypeOfExpression.cs: Added default value for type.
	* CodeTypeReferenceCollection.cs: Fixed AddRange methods not to throw 
	an exception (as the list was being changed when using an enumerator).
	* CodeTypeReferenceExpression.cs: Added default value for type.
	* CodeVariableDeclarationStatement.cs: Added default value for name 
	and type.
	* CodeVariableReferenceExpression.cs: Added default value for 
	variableName.


svn path=/trunk/mcs/; revision=52127
2005-10-24 14:33:27 +00:00
Sebastien Pouliot d9bfc572cc 2005-10-23 Sebastien Pouliot <[email protected]>
* CodeTypeParameterCollection.cs: Added missing Add(string) method.


svn path=/trunk/mcs/; revision=52103
2005-10-23 20:15:27 +00:00
Sebastien Pouliot b02ef389e2 2005-10-23 Sebastien Pouliot <[email protected]>
* CodeAttributeDeclaration.cs: Added new 2.0 ctor and AttributeType 
	property.
	* CodeDefaultValueExpression.cs: New. Implemented (2.0).
	* CodeDirectiveCollection.cs: Completed implementation.
	* CodeGotoStatement.cs: Added default ctor for 2.0.
	* CodeIndexerExpression.cs: Fixed typo in header.
	* CodeLinePragma.cs: Added default ctor for 2.0.
	* CodeRegionMode.cs: Added missing None element.
	* CodeSnippetCompileUnit.cs: Added default ctor for 2.0.
	* CodeTypeDeclaration.cs: Added ComVisible(false) on TypeParameters 
	property.
	* CodeTypeParameterCollection.cs: Completed implementation.


svn path=/trunk/mcs/; revision=52098
2005-10-23 18:54:07 +00:00
Gert Driesen 6f13bef75d * CodeGeneratorTypeOutputTest.cs: Added tests for CSharpCodeGenerator.GetTypeOutput.
* CodeTypeReferenceTest.cs: Added tests for multi-dimensional arrays.
* CSharpCodeGenerator.cs: Fixed supported for type arguments in
GetTypeOutput on 2.0 profile. Partial fix for bug #76286.
* CodeTypeReference.cs: Fixed Parse implementation on 1.0 profile.
Added MonoTODO's.
* System_test.dll.sources: Added CodeGeneratorTypeOutputTest.cs
from Test/Microsoft.CSharp.

svn path=/trunk/mcs/; revision=51378
2005-10-06 22:49:14 +00:00
Gert Driesen 08c37001e2 * CodeTypeReference.cs: Added support for generic type parameters.
* CodeTypeReferenceTest.cs: Added tests for generic types and base
types with generic type parameters.

svn path=/trunk/mcs/; revision=51218
2005-10-04 22:10:57 +00:00
Gert Driesen c886291d70 * CodeTypeReferenceTest.cs: Added tests for CodeTypeParameter ctor,
and string (basetype) ctor.
* CodeTypeReference.cs: Added default ctor for 2.0 profile. Set
Options to CodeReferenceOptions.GenericTypeParameter when instance
is constructed using ctor taking CodeTypeParameter argument. Modified
BaseType property to return BaseType of ArrayElementType if
available. Fixed some bugs in array and typeparameter support.

svn path=/trunk/mcs/; revision=51089
2005-10-02 14:57:07 +00:00
Gert Driesen cafc6003d6 * CodeGeneratorFromTypeTest.cs: Added BaseTypes and TypeConstructor
tests. Added enum, interface and delegate tests.
* CodeTypeDelegateTest.cs: Added tests for BaseTypes and ReturnType.
* CodeGeneratorTest.cs: Removed duplicate import of NUNit.Framework namespace.
* CodeGeneratorFromTypeTestBase.cs: Added BaseTypes and TypeConstructor tests.
* CodeGeneratorFromTypeTest.cs: Added BaseTypes and TypeConstructor
tests. Enabled enum, interface and delegate tests.
* CSharpCodeGenerator.cs: Fixed generated code for enums, interfaces
and delegates to match MS.NET.
* CodeTypeReference.cs: Added internal IsInterface property.
* CodeTypeDelegate.cs: System.Delegate is base type, and make sure
ReturnType is initialized.
* System_test.dll.sources: Added CodeTypeDelegateTest.cs from System.CodeDom.
* CodeGenerator.cs: Threat delegates like any other type.
* VBCodeGenerator.cs: Fixed generated code for enums, interfaces and
delegates to match MS.NET.

svn path=/trunk/mcs/; revision=47604
2005-07-24 12:19:26 +00:00
Gert Driesen 9db8d8e301 * CodeGeneratorFromExpressionTest.cs: No longer inherit from
CodeGeneratorTestBase. Added tests for CodeTypeReference.
* CodeTypeReferenceTest.cs: Tests for zero-length and null type names,
and null type.
* CodeGeneratorFromExpressionTest.cs: Renumbered tests for
TypeReferenceExpressionTest. Added tests for zero-length or null
type name, and object type.
* CSharpCodeGenerator.cs: Fixed GetTypeOutput to match MS.NET 1.x and 2.0.
* CodeTypeReference.cs: Also consider null type name as void, throw
ArgumentNullException for null type on 2.0 profile.
* System_test.dll.sources: Added CodeTypeReferenceTest.cs from
System.CodeDom.

svn path=/trunk/mcs/; revision=46662
2005-06-28 18:17:53 +00:00
Gert Driesen a420f939be * CodeMemberPropertyTest.cs: Test for default value of Type property.
* CodeGeneratorFromCompileUnitTest.cs: Removed last usage of Assertion class.
* CodeGeneratorFromTypeTest.cs: Added tests for method, property and
parameter level attributes.
* CodeMemberProperty.cs: Default value of Type is empty CodeTypeReference.
* System_test.dll.sources: Added CodeMemberPropertyTest.cs from System.CodeDom.
* VBCodeGenerator.cs: Fixed generated code for method, property and parameter 
level attributes. Fixed code generated for FieldDirection.

svn path=/trunk/mcs/; revision=46516
2005-06-26 08:56:28 +00:00
Gert Driesen 0c9d140147 * CodeTypeReference.cs: Fixed line endings.
* CodeMemberField.cs: Default value of Type is empty CodeTypeReference.

svn path=/trunk/mcs/; revision=46501
2005-06-25 19:18:47 +00:00
Marek Safar 3f90af0020 2004-09-14 Marek Safar <[email protected]>
* CodeTypeReference.cs: Fix #65854

svn path=/trunk/mcs/; revision=33856
2004-09-14 08:23:08 +00:00
Marek Safar 5d46b79756 2004-09-06 Marek Safar <[email protected]>
* CodeCompileUnit.cs,
	* CodeMemberMethod.cs,
	* CodeMethodReferenceExpression.cs,
	* CodeStatement.cs,
	* CodeTypeDeclaration.cs,
	* CodeTypeMember.cs,
	* CodeTypeReference.cs : Implemented NET_2_0.

	* CodeChecksumPragma.cs,
	* CodeDirective.cs,
	* CodeDirectiveCollection.cs,
	* CodeRegionDirective.cs,
	* CodeRegionMode.cs,
	* CodeTypeParameter.cs,
	* CodeTypeParameterCollection.cs,
	* CodeTypeReferenceOptions.cs : New NET_2_0 files

svn path=/trunk/mcs/; revision=33419
2004-09-06 16:32:53 +00:00
Marek Safar fb98c02600 I fixed mono CodeDom bugs to pass on the latest Microsoft CodeDom Test Suite.
svn path=/trunk/mcs/; revision=33172
2004-09-01 18:45:52 +00:00
Gonzalo Paniagua Javier 58dba0999f 2004-08-09 Gonzalo Paniagua Javier <[email protected]>
* CodeEntryPointMethod.cs: patch by Fawad Halim that makes the entry
	point method public.

svn path=/trunk/mcs/; revision=32082
2004-08-09 16:29:28 +00:00
Jackson Harper 95b48e410b * CodeTypeMember.cs: Name is String.Empty if not set.
* CodeComment.cs: Text is String.Empty if not set.

svn path=/trunk/mcs/; revision=22777
2004-02-04 23:46:18 +00:00
Gonzalo Paniagua Javier 24c4c225d2 2003-12-23 Jaroslaw Kowalski <[email protected]>
* CodeAttributeDeclaration.cs:
	* CodeDelegateInvokeExpression:
	  -Added "params" keyword to constructors

svn path=/trunk/mcs/; revision=21979
2004-01-12 11:12:48 +00:00
Gonzalo Paniagua Javier 42df29f6a0 2003-08-15 Jaroslaw Kowalski <[email protected]>
* Microsoft.CSharp/CSharpCodeGenerator.cs:

         - fixed support for method references where target
               object is null
         - fixed CodeThrowExceptionStatement
         - disabled member access modifiers for private method
           implementations
         - disabled generation of empty method body for interface
           declarations
         - disabled generation of empty property accessor bodies
           in interface declarations
         - added support for indexers (properties named "Item")
         - added support for chained constructor arguments and
           base constructor arguments

       * System.CodeDom/CodeTypeDeclaration.cs:

         - TypeAttributes of CodeTypeDeclaration now defaults to
           TypeAttributes.Public (same as MS implementation)

svn path=/trunk/mcs/; revision=17363
2003-08-16 01:58:56 +00:00
Gonzalo Paniagua Javier 9a5a136256 2003-04-25 Gonzalo Paniagua Javier <[email protected]>
* CodeEventReferenceExpression.cs: fixed typo that prevented event
	name from being set.

svn path=/trunk/mcs/; revision=14003
2003-04-25 16:16:49 +00:00
Gonzalo Paniagua Javier fd6f5a46b5 2003-04-24 Gonzalo Paniagua Javier <[email protected]>
* Microsoft.CSharp/CSharpCodeGenerator.cs: implemented
	GenerateSnippetMember and some little fixes.

	* System.CodeDom/CodeMemberProperty.cs: fixed HasGet and HasSet to
	actually generate code for the property.

	* System.CodeDom.Compiler/CodeGenerator.cs: more fixes and sorted the
	output.

	* System.CodeDom.Compiler/IndentedTextWriter.cs: don't output tabs in
	WriteLine ().

svn path=/trunk/mcs/; revision=13960
2003-04-24 06:32:22 +00:00
Ravi Pratap M 492d1d3251 2002-10-11 Ravi Pratap <[email protected]>
* CodeMethodInvokeExpression.cs : Fix second constructor so that
	the last argument is params - that is what the docs say.

svn path=/trunk/mcs/; revision=8176
2002-10-11 20:14:38 +00:00
Gonzalo Paniagua Javier fe249c988a 2002-09-11 Gonzalo Paniagua Javier <[email protected]>
* CodeBinaryOperatorType.cs:
	* CodeMemberEvent.cs:
	* CodeParameterDeclarationExpression.cs:
	* CodeTypeMember.cs:
	* CodeTypeReference.cs:
	* CodeTypeReferenceCollection.cs: misc. fixes

svn path=/trunk/mcs/; revision=7369
2002-09-11 23:40:11 +00:00
Daniel Stodden 1b4e294c54 big patch:
- System.CodeDom: lotsa corrections
	- System.CodeDom.Compiler: CodeGenerator about 80% complete
	- Microsoft.CSharp: CSharpCodegenerator intro

svn path=/trunk/mcs/; revision=4980
2002-05-28 06:59:57 +00:00
Daniel Stodden d89628eae5 - System.CodeDom review, ns more or less complete now
svn path=/trunk/mcs/; revision=4532
2002-05-11 15:44:41 +00:00
Sean MacIsaac 1fe22719b1 * MemberAttributes.cs: Added so rest of classes would compile.
* FieldDirection.cs: Added so rest of classes would compile.

* CodeTypeMember.cs: Added so rest of classes would compile.

* CodeTypeDeclaration.cs: Added so rest of classes would compile.

* CodeObject.cs: Added so rest of classes would compile.

* CodeBinaryOperatorType.cs: Added so rest of classes would compile.

svn path=/trunk/mcs/; revision=148
2001-07-15 05:44:59 +00:00
Sean MacIsaac 7fc6d7d59d Fixed all sorts of compiler errors.
svn path=/trunk/mcs/; revision=124
2001-07-13 22:20:51 +00:00